Class StringPredicates2
java.lang.Object
org.eclipse.collections.impl.block.factory.StringPredicates2
The StringPredicates2 class is a factory that produces Predicate2 instances that work with Strings.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static final classprivate static final classprivate static final classprivate static final classprivate static final classprivate static final classprivate static final classprivate static final classprivate static final class -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final StringPredicates2.ContainsStringprivate static final StringPredicates2.EndsWithprivate static final StringPredicates2.EqualsIgnoreCaseprivate static final StringPredicates2.MatchesRegexprivate static final StringPredicates2.NotContainsStringprivate static final StringPredicates2.NotEndsWithprivate static final StringPredicates2.NotEqualsIgnoreCaseprivate static final StringPredicates2.NotStartsWithprivate static final StringPredicates2.StartsWith -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Predicates2<String, String> contains()Returns true if a String specified on the predicate is contained within a String passed to the accept method.static Predicates2<String, String> endsWith()Returns true if a String passed to the accept method ends with the string specified on the predicate.static Predicates2<String, String> static Predicates2<String, String> matches()static Predicates2<String, String> Returns true if a String specified on the predicate is contained within a String passed to the accept method.static Predicates2<String, String> Returns false if a String passed to the accept method ends with the string specified on the predicate.static Predicates2<String, String> static Predicates2<String, String> Returns false if a String passed to the accept method starts with the string specified on the predicate.static Predicates2<String, String> Returns true if a String passed to the accept method starts with the string specified on the predicate.
-
Field Details
-
CONTAINS_STRING
-
NOT_CONTAINS_STRING
-
STARTS_WITH
-
NOT_STARTS_WITH
-
ENDS_WITH
-
NOT_ENDS_WITH
-
EQUALS_IGNORE_CASE
-
NOT_EQUALS_IGNORE_CASE
-
MATCHES_REGEX
-
-
Constructor Details
-
StringPredicates2
private StringPredicates2()
-
-
Method Details
-
contains
Returns true if a String specified on the predicate is contained within a String passed to the accept method. -
notContains
Returns true if a String specified on the predicate is contained within a String passed to the accept method.- Since:
- 5.0
-
startsWith
Returns true if a String passed to the accept method starts with the string specified on the predicate. -
notStartsWith
Returns false if a String passed to the accept method starts with the string specified on the predicate.- Since:
- 5.0
-
endsWith
Returns true if a String passed to the accept method ends with the string specified on the predicate. -
notEndsWith
Returns false if a String passed to the accept method ends with the string specified on the predicate.- Since:
- 5.0
-
equalsIgnoreCase
-
notEqualsIgnoreCase
- Since:
- 5.0
-
matches
-