hep.physics.filter
Class Filter

java.lang.Object
  extended by hep.physics.filter.Filter
All Implemented Interfaces:
java.util.Iterator

public class Filter
extends java.lang.Object
implements java.util.Iterator

An iterator that filters an input iterator to only accept items that are accepted by a given predicate.


Constructor Summary
Filter(java.util.Iterator e, Predicate p)
           
 
Method Summary
 boolean hasNext()
           
 java.lang.Object next()
           
 void remove()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Filter

public Filter(java.util.Iterator e,
              Predicate p)
Method Detail

next

public java.lang.Object next()
Specified by:
next in interface java.util.Iterator

hasNext

public boolean hasNext()
Specified by:
hasNext in interface java.util.Iterator

remove

public void remove()
Specified by:
remove in interface java.util.Iterator


Copyright © 2000-2010 FreeHEP. All Rights Reserved.