org.objectweb.jac.util
Class Predicate

java.lang.Object
  |
  +--org.objectweb.jac.util.Predicate
Direct Known Subclasses:
NotInCollectionPredicate

public abstract class Predicate
extends Object

A Predicate class.

Author:
Laurent Martelli

Constructor Summary
Predicate()
           
 
Method Summary
abstract  boolean apply(Object object)
           
 void filter(Collection in, Collection out)
          Keeps only the items matching the predicate from a collection
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Predicate

public Predicate()
Method Detail

apply

public abstract boolean apply(Object object)

filter

public void filter(Collection in,
                   Collection out)
Keeps only the items matching the predicate from a collection

Parameters:
in - filter items from that collection
out - matching items are added to this collection