org.jikesrvm.compilers.opt.util
Class ReverseEnumerator<T>

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

public final class ReverseEnumerator<T>
extends Object
implements Enumeration<T>

An enumerator that provides access to the reverse order of elements for a given Enumeration.


Field Summary
private  int index
           
private  ArrayList<T> vec
           
 
Constructor Summary
ReverseEnumerator(Enumeration<T> e)
           
 
Method Summary
 boolean hasMoreElements()
           
 T nextElement()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

vec

private final ArrayList<T> vec

index

private int index
Constructor Detail

ReverseEnumerator

public ReverseEnumerator(Enumeration<T> e)
Method Detail

hasMoreElements

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

nextElement

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