Package com.google.common.base
Class Predicates.ContainsPatternPredicate
- java.lang.Object
-
- com.google.common.base.Predicates.ContainsPatternPredicate
-
- All Implemented Interfaces:
Predicate<java.lang.CharSequence>
,java.io.Serializable
,java.util.function.Predicate<java.lang.CharSequence>
- Direct Known Subclasses:
Predicates.ContainsPatternFromStringPredicate
- Enclosing class:
- Predicates
@GwtIncompatible private static class Predicates.ContainsPatternPredicate extends java.lang.Object implements Predicate<java.lang.CharSequence>, java.io.Serializable
- See Also:
Predicates.contains(Pattern)
-
-
Field Summary
Fields Modifier and Type Field Description (package private) CommonPattern
pattern
private static long
serialVersionUID
-
Constructor Summary
Constructors Constructor Description ContainsPatternPredicate(CommonPattern pattern)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
apply(java.lang.CharSequence t)
Returns the result of applying this predicate toinput
(Java 8 users, see notes in the class documentation above).boolean
equals(java.lang.Object obj)
Indicates whether another object is equal to this predicate.int
hashCode()
java.lang.String
toString()
-
-
-
Field Detail
-
pattern
final CommonPattern pattern
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
ContainsPatternPredicate
ContainsPatternPredicate(CommonPattern pattern)
-
-
Method Detail
-
apply
public boolean apply(java.lang.CharSequence t)
Description copied from interface:Predicate
Returns the result of applying this predicate toinput
(Java 8 users, see notes in the class documentation above). This method is generally expected, but not absolutely required, to have the following properties:- Its execution does not cause any observable side effects.
- The computation is consistent with equals; that is,
Objects.equal
(a, b)
implies thatpredicate.apply(a) == predicate.apply(b))
.
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
Description copied from interface:Predicate
Indicates whether another object is equal to this predicate.Most implementations will have no reason to override the behavior of
Object.equals(java.lang.Object)
. However, an implementation may also choose to returntrue
wheneverobject
is aPredicate
that it considers interchangeable with this one. "Interchangeable" typically means thatthis.apply(t) == that.apply(t)
for allt
of typeT
). Note that afalse
result from this method does not imply that the predicates are known not to be interchangeable.
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-