com.ebmwebsourcing.easycommons.lang
Class StringHelper
java.lang.Object
com.ebmwebsourcing.easycommons.lang.StringHelper
public class StringHelper
- extends Object
- Author:
- Mathieu CARROLLE - EBM WebSourcing
|
Method Summary |
static boolean |
equal(String a,
String b)
Test the equality of the specified strings. test is : ( (a==b==null) ||
a.equals(b) ) |
static boolean |
isNullOrEmpty(String s)
Return true if the String is null, contains only space character or is
empty. |
static String |
nonNullValue(Object obj)
Return an empty String if obj is null, otherwise
return obj.toString(). |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
StringHelper
public StringHelper()
isNullOrEmpty
public static boolean isNullOrEmpty(String s)
- Return true if the String is null, contains only space character or is
empty.
- Parameters:
s - a string
- Returns:
- true if the String is null, contains only space character or is
empty, otherwise false
nonNullValue
public static String nonNullValue(Object obj)
- Return an empty
String if obj is null, otherwise
return obj.toString().
- Parameters:
obj -
- Returns:
equal
public static final boolean equal(String a,
String b)
- Test the equality of the specified strings. test is : ( (a==b==null) ||
a.equals(b) )
- Parameters:
a - b -
- Returns:
Copyright © 2013 Petals Link. All rights reserved.