|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjpaul.Misc.Predicate<T>
jpaul.Misc.EqualityPredicate<T>
public class EqualityPredicate<T>
EqualityPredicate
is a simple predicate that checks
equality with a reference element. Equality is checked by using
.equals
.
Constructor Summary | |
---|---|
EqualityPredicate(T referenceElem)
Creates a EqualityPredicate . |
Method Summary | |
---|---|
boolean |
check(T elem)
The boolean predicate. |
Methods inherited from class jpaul.Misc.Predicate |
---|
AND, FALSE, FULL_AND, FULL_OR, NOT, OR, TRUE |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public EqualityPredicate(T referenceElem)
EqualityPredicate
.
referenceElem
- The element we check for equality
against. The newly created predicate will be
true
only for the elements that are equal with
referenceElem
. We assume that only
null
is equal to null
.Method Detail |
---|
public boolean check(T elem)
Predicate
check
in class Predicate<T>
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |