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 com.google.common.base.Predicate<java.lang.CharSequence> |
containsRegex(java.lang.String regex) |
static <T> com.google.common.base.Predicate<T> |
equalToAny(java.lang.Iterable<T> vals) |
static <T extends java.lang.CharSequence> |
isBlank()
predicate form of
Strings.isBlank(CharSequence) |
static <T> com.google.common.base.Predicate<T> |
isNonBlank()
Tests if object is non-null and not a blank string.
|
static com.google.common.base.Predicate<java.lang.Object> |
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> com.google.common.base.Predicate<T> isBlank()
Strings.isBlank(CharSequence)
public static <T> com.google.common.base.Predicate<T> isNonBlank()
Predicate form of Strings.isNonBlank(CharSequence)
also accepting objects non-null, for convenience
public static <T extends java.lang.CharSequence> com.google.common.base.Predicate<T> containsLiteralIgnoreCase(java.lang.String fragment)
public static <T extends java.lang.CharSequence> com.google.common.base.Predicate<T> containsLiteral(java.lang.String fragment)
public static <T extends java.lang.CharSequence> com.google.common.base.Predicate<T> containsAllLiterals(java.lang.String... fragments)
public static com.google.common.base.Predicate<java.lang.CharSequence> containsRegex(java.lang.String regex)
public static <T extends java.lang.CharSequence> com.google.common.base.Predicate<T> startsWith(java.lang.String prefix)
public static com.google.common.base.Predicate<java.lang.Object> isStringStartingWith(java.lang.String prefix)
CharSequence
starting with the given prefixpublic static <T> com.google.common.base.Predicate<T> equalToAny(java.lang.Iterable<T> vals)
public static <T extends java.lang.CharSequence> com.google.common.base.Predicate<T> matchesRegex(java.lang.String regex)
public static <T extends java.lang.CharSequence> com.google.common.base.Predicate<T> matchesGlob(java.lang.String glob)