org.jikesrvm.compilers.opt.util
Class FilterEnumerator<S,T>

java.lang.Object
  extended by org.jikesrvm.compilers.opt.util.FilterEnumerator<S,T>
All Implemented Interfaces:
Enumeration<T>

public class FilterEnumerator<S,T>
extends Object
implements Enumeration<T>

A FilterEnumerator filters and maps a source Enumeration to generate a new one.


Nested Class Summary
static class FilterEnumerator.Filter<S,T>
           
 
Field Summary
private  boolean done
           
(package private)  Enumeration<S> e
           
(package private)  FilterEnumerator.Filter<S,T> f
           
private  S next
           
 
Constructor Summary
FilterEnumerator(Enumeration<S> e, FilterEnumerator.Filter<S,T> f)
           
 
Method Summary
private  void advance()
           
 boolean hasMoreElements()
           
 T nextElement()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

e

final Enumeration<S> e

f

final FilterEnumerator.Filter<S,T> f

next

private S next

done

private boolean done
Constructor Detail

FilterEnumerator

public FilterEnumerator(Enumeration<S> e,
                        FilterEnumerator.Filter<S,T> f)
Method Detail

advance

private void advance()

nextElement

public T nextElement()
Specified by:
nextElement in interface Enumeration<T>

hasMoreElements

public boolean hasMoreElements()
Specified by:
hasMoreElements in interface Enumeration<T>