private static class Predicates.IsEqualToPredicate extends java.lang.Object implements Predicate<java.lang.Object>, java.io.Serializable
Predicates.equalTo(Object)| Modifier and Type | Field and Description |
|---|---|
private static long |
serialVersionUID |
private java.lang.Object |
target |
| Modifier | Constructor and Description |
|---|---|
private |
IsEqualToPredicate(java.lang.Object target) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
apply(java.lang.Object o)
Returns the result of applying this predicate to
input (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() |
(package private) <T> Predicate<T> |
withNarrowedType() |
private final java.lang.Object target
private static final long serialVersionUID
public boolean apply(@CheckForNull
java.lang.Object o)
Predicateinput (Java 8 users, see notes in the
class documentation above). This method is generally expected, but not absolutely
required, to have the following properties:
Objects.equal(a, b) implies that predicate.apply(a) ==
predicate.apply(b)).
public int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(@CheckForNull
java.lang.Object obj)
PredicateMost implementations will have no reason to override the behavior of Object.equals(java.lang.Object).
However, an implementation may also choose to return true whenever object is a
Predicate that it considers interchangeable with this one. "Interchangeable"
typically means that this.apply(t) == that.apply(t) for all t of type
T). Note that a false result from this method does not imply that the
predicates are known not to be interchangeable.
equals in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Object<T> Predicate<T> withNarrowedType()