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
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 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 the accept method.static Predicates<String>
empty()
static Predicates<String>
endsWith(String substring)
Returns true if a String passed to the 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 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 the accept method starts with the string specified on the predicate.
-
Method Details
-
empty
-
notEmpty
-
contains
Returns true if a String specified on the predicate is contained within a String passed to the the accept method. -
notContains
Returns true if a String specified on the predicate is contained within a String passed to the the accept method.- Since:
- 5.0
-
contains
Returns true if a char specified on the predicate is contained within a String passed to the the accept method. -
startsWith
Returns true if a String passed to the the accept method starts with the string specified on the predicate. -
endsWith
Returns true if a String passed to the the accept method ends with the string specified on the predicate. -
size
-
equalsIgnoreCase
-
matches
-
lessThan
-
lessThanOrEqualTo
-
greaterThan
-
greaterThanOrEqualTo
-
hasLetters
-
hasDigits
-
hasLettersOrDigits
-
hasLettersAndDigits
-
hasSpaces
-
hasUpperCase
-
hasLowerCase
-
hasUndefined
-
isNumeric
-
isAlphanumeric
-
isBlank
-
notBlank
-
isAlpha
-