public class StringPredicates
extends java.lang.Object
Constructor and Description |
---|
StringPredicates() |
Modifier and Type | Method and Description |
---|---|
static <T extends java.lang.CharSequence> |
containsAllLiterals(java.lang.String... fragments) |
static <T extends java.lang.CharSequence> |
containsLiteral(java.lang.String fragment) |
static <T extends java.lang.CharSequence> |
containsLiteralIgnoreCase(java.lang.String fragment) |
static <any> |
containsRegex(java.lang.String regex) |
static <T> <any> |
equalToAny(java.lang.Iterable<T> vals) |
static <T extends java.lang.CharSequence> |
isBlank()
predicate form of
Strings.isBlank(CharSequence) |
static <T> <any> |
isNonBlank()
Tests if object is non-null and not a blank string.
|
static <any> |
isStringStartingWith(java.lang.String prefix)
true if the object *is* a
CharSequence starting with the given prefix |
static <T extends java.lang.CharSequence> |
matchesGlob(java.lang.String glob) |
static <T extends java.lang.CharSequence> |
matchesRegex(java.lang.String regex) |
static <T extends java.lang.CharSequence> |
startsWith(java.lang.String prefix) |
public static <T extends java.lang.CharSequence> <any> isBlank()
Strings.isBlank(CharSequence)
public static <T> <any> isNonBlank()
Predicate form of Strings.isNonBlank(CharSequence)
also accepting objects non-null, for convenience
public static <T extends java.lang.CharSequence> <any> containsLiteralIgnoreCase(java.lang.String fragment)
public static <T extends java.lang.CharSequence> <any> containsLiteral(java.lang.String fragment)
public static <T extends java.lang.CharSequence> <any> containsAllLiterals(java.lang.String... fragments)
public static <any> containsRegex(java.lang.String regex)
public static <T extends java.lang.CharSequence> <any> startsWith(java.lang.String prefix)
public static <any> isStringStartingWith(java.lang.String prefix)
CharSequence
starting with the given prefixpublic static <T> <any> equalToAny(java.lang.Iterable<T> vals)
public static <T extends java.lang.CharSequence> <any> matchesRegex(java.lang.String regex)
public static <T extends java.lang.CharSequence> <any> matchesGlob(java.lang.String glob)