com.infomancers.collections.util.predicates
Class InCollection<T>

java.lang.Object
  extended by com.infomancers.collections.util.predicates.InCollection<T>
All Implemented Interfaces:
Predicate<T>

public class InCollection<T>
extends java.lang.Object
implements Predicate<T>

Determines whether the item in question is contained within a predefined collection.


Constructor Summary
InCollection(java.util.Collection<T> coll)
           
 
Method Summary
 boolean evaluate(T item)
          Evaluates an item to see if it fits the boolean query.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InCollection

public InCollection(java.util.Collection<T> coll)
Method Detail

evaluate

public boolean evaluate(T item)
Evaluates an item to see if it fits the boolean query.

Specified by:
evaluate in interface Predicate<T>
Parameters:
item - The item to evaluate.
Returns:
Whether the item fits the query.