public final class UniquePredicate extends java.lang.Object implements Predicate, java.io.Serializable
| Modifier and Type | Field and Description |
|---|---|
private java.util.Set |
iSet
The set of previously seen objects
|
private static long |
serialVersionUID
Serial version UID
|
| Constructor and Description |
|---|
UniquePredicate()
Constructor that performs no validation.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
evaluate(java.lang.Object object)
Evaluates the predicate returning true if the input object hasn't been
received yet.
|
static Predicate |
getInstance()
Factory to create the predicate.
|
private static final long serialVersionUID
private final java.util.Set iSet
public UniquePredicate()
getInstance if you want that.public static Predicate getInstance()
java.lang.IllegalArgumentException - if the predicate is null