⇒ Index (Frames) |  ⇒ Index (No Frames) |  ⇒ Package |  ⇒ Package Tree |  ⇒ Full Tree 
org.apache.commons.collections.functors

Class UniquePredicate

java.lang.Object
|
+--org.apache.commons.collections.functors.UniquePredicate

All Implemented Interfaces:
Predicate, Serializable


public final class UniquePredicate
extends java.lang.Object
implements Predicate, Serializable

Predicate implementation that returns true the first time an object is passed into the predicate.
Since:
Commons Collections 3.0
Author:
Stephen Colebourne

Constructor Summary

UniquePredicate()

Constructor that performs no validation.

Method Summary

boolean

evaluate(Object object)

Return the predicate result.

static Predicate

getInstance()

Factory to create the predicate.

Constructor Details

UniquePredicate

public UniquePredicate()

Constructor that performs no validation. Use getInstance if you want that.

Method Details

evaluate

public boolean evaluate(Object object)

Return the predicate result.

Parameters:
object

getInstance

public static Predicate getInstance()

Factory to create the predicate.

Returns:
the predicate
Throws:
- if the predicate is null