agg.util
Class Filter_Duplicates

java.lang.Object
  extended by agg.util.Filter_Duplicates
All Implemented Interfaces:
com.objectspace.jgl.UnaryPredicate, java.io.Serializable

public class Filter_Duplicates
extends java.lang.Object
implements com.objectspace.jgl.UnaryPredicate

A sample filter for use with FilterIterator. It removes duplicate elements from an iteration. equals() is used as the method to determine if two objects are the same.

See Also:
Serialized Form

Field Summary
 
Fields inherited from interface com.objectspace.jgl.UnaryPredicate
serialVersionUID
 
Constructor Summary
Filter_Duplicates()
          Construct myself to be a filter that skips an object if the same object has been processed before.
 
Method Summary
 boolean execute(java.lang.Object obj)
          Return true for an object if execute() has been called for it before.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Filter_Duplicates

public Filter_Duplicates()
Construct myself to be a filter that skips an object if the same object has been processed before.

Method Detail

execute

public final boolean execute(java.lang.Object obj)
Return true for an object if execute() has been called for it before.

Specified by:
execute in interface com.objectspace.jgl.UnaryPredicate