com.wideplay.warp.util
Class Text
java.lang.Object
com.wideplay.warp.util.Text
public class Text
- extends java.lang.Object
Created with IntelliJ IDEA.
User: dhanji
Date: Mar 1, 2008
Time: 10:21:41 AM
A utility analogous to com.google.inject.util.Strings
- Author:
- Dhanji R. Prasanna (dhanji gmail com)
|
Constructor Summary |
Text()
|
|
Method Summary |
static boolean |
isNotEmpty(java.lang.String str)
|
static void |
nonEmpty(java.lang.String str,
java.lang.String message)
An assertion utility |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Text
public Text()
nonEmpty
public static void nonEmpty(java.lang.String str,
java.lang.String message)
- An assertion utility
- Parameters:
str - A string to test for emptiness (i.e. non null and not the empty string
when trimmed)message - A message to throw as an IllegalArgumentException
- Throws:
java.lang.IllegalArgumentException - Thrown with the message if this string is empty
isNotEmpty
public static boolean isNotEmpty(java.lang.String str)
- Parameters:
str - A string to test for emptiness (i.e. non null and not the empty string
when trimmed)
- Returns:
- Returns true if the string is not empty.