[New] added method StringHelper.isNotEmpty()
This commit is contained in:
parent
a79c9d88ce
commit
dda9ed8423
|
@ -40,6 +40,8 @@ public class StringHelper {
|
||||||
public static final String DASH = "-"; //$NON-NLS-1$
|
public static final String DASH = "-"; //$NON-NLS-1$
|
||||||
public static final String UNDERLINE = "_"; //$NON-NLS-1$
|
public static final String UNDERLINE = "_"; //$NON-NLS-1$
|
||||||
public static final String COMMA = ","; //$NON-NLS-1$
|
public static final String COMMA = ","; //$NON-NLS-1$
|
||||||
|
public static final String SEMICOLON = ";"; //$NON-NLS-1$
|
||||||
|
public static final String COLON = ":"; //$NON-NLS-1$
|
||||||
|
|
||||||
private static final Logger logger = LoggerFactory.getLogger(StringHelper.class);
|
private static final Logger logger = LoggerFactory.getLogger(StringHelper.class);
|
||||||
|
|
||||||
|
@ -582,6 +584,18 @@ public class StringHelper {
|
||||||
return value == null || value.isEmpty();
|
return value == null || value.isEmpty();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Simply returns true if the value is neither null nor empty
|
||||||
|
*
|
||||||
|
* @param value
|
||||||
|
* the value to check
|
||||||
|
*
|
||||||
|
* @return true if the value is neither null nor empty
|
||||||
|
*/
|
||||||
|
public static boolean isNotEmpty(String value) {
|
||||||
|
return value != null && !value.isEmpty();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
* Parses the given string value to a boolean. This extends the default {@link Boolean#parseBoolean(String)} as it
|
* Parses the given string value to a boolean. This extends the default {@link Boolean#parseBoolean(String)} as it
|
||||||
|
|
Loading…
Reference in New Issue