Class StringPredicates
- java.lang.Object
-
- org.eclipse.collections.impl.block.factory.StringPredicates
-
public final class StringPredicates extends Object
The StringPredicates class is a factory that produces Predicates that work with Strings.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Predicates<String>contains(char character)Returns true if a char specified on the predicate is contained within a String passed to the accept method.static Predicates<String>contains(String otherString)Returns true if a String specified on the predicate is contained within a String passed to the accept method.static Predicates<String>empty()static Predicates<String>endsWith(String substring)Returns true if a String passed to the accept method ends with the string specified on the predicate.static Predicates<String>equalsIgnoreCase(String otherString)static Predicates<String>greaterThan(String string)static Predicates<String>greaterThanOrEqualTo(String string)static Predicates<String>hasDigits()static Predicates<String>hasLetters()static Predicates<String>hasLettersAndDigits()static Predicates<String>hasLettersOrDigits()static Predicates<String>hasLowerCase()static Predicates<String>hasSpaces()static Predicates<String>hasUndefined()static Predicates<String>hasUpperCase()static Predicates<String>isAlpha()static Predicates<String>isAlphanumeric()static Predicates<String>isBlank()static Predicates<String>isNumeric()static Predicates<String>lessThan(String string)static Predicates<String>lessThanOrEqualTo(String string)static Predicates<String>matches(String regex)static Predicates<String>notBlank()static Predicates<String>notContains(String otherString)Returns true if a String specified on the predicate is contained within a String passed to the accept method.static Predicates<String>notEmpty()static Predicates<String>size(int size)static Predicates<String>startsWith(String substring)Returns true if a String passed to the accept method starts with the string specified on the predicate.
-
-
-
Method Detail
-
empty
public static Predicates<String> empty()
-
notEmpty
public static Predicates<String> notEmpty()
-
contains
public static Predicates<String> contains(String otherString)
Returns true if a String specified on the predicate is contained within a String passed to the accept method.
-
notContains
public static Predicates<String> notContains(String otherString)
Returns true if a String specified on the predicate is contained within a String passed to the accept method.- Since:
- 5.0
-
contains
public static Predicates<String> contains(char character)
Returns true if a char specified on the predicate is contained within a String passed to the accept method.
-
startsWith
public static Predicates<String> startsWith(String substring)
Returns true if a String passed to the accept method starts with the string specified on the predicate.
-
endsWith
public static Predicates<String> endsWith(String substring)
Returns true if a String passed to the accept method ends with the string specified on the predicate.
-
size
public static Predicates<String> size(int size)
-
equalsIgnoreCase
public static Predicates<String> equalsIgnoreCase(String otherString)
-
matches
public static Predicates<String> matches(String regex)
-
lessThan
public static Predicates<String> lessThan(String string)
-
lessThanOrEqualTo
public static Predicates<String> lessThanOrEqualTo(String string)
-
greaterThan
public static Predicates<String> greaterThan(String string)
-
greaterThanOrEqualTo
public static Predicates<String> greaterThanOrEqualTo(String string)
-
hasLetters
public static Predicates<String> hasLetters()
-
hasDigits
public static Predicates<String> hasDigits()
-
hasLettersOrDigits
public static Predicates<String> hasLettersOrDigits()
-
hasLettersAndDigits
public static Predicates<String> hasLettersAndDigits()
-
hasSpaces
public static Predicates<String> hasSpaces()
-
hasUpperCase
public static Predicates<String> hasUpperCase()
-
hasLowerCase
public static Predicates<String> hasLowerCase()
-
hasUndefined
public static Predicates<String> hasUndefined()
-
isNumeric
public static Predicates<String> isNumeric()
-
isAlphanumeric
public static Predicates<String> isAlphanumeric()
-
isBlank
public static Predicates<String> isBlank()
-
notBlank
public static Predicates<String> notBlank()
-
isAlpha
public static Predicates<String> isAlpha()
-
-