CH.ifa.draw.standard
Class ReverseFigureEnumerator

java.lang.Object
  extended by CH.ifa.draw.standard.ReverseFigureEnumerator
All Implemented Interfaces:
FigureEnumeration, java.util.Enumeration

public final class ReverseFigureEnumerator
extends java.lang.Object
implements FigureEnumeration

An Enumeration that enumerates a vector of figures back (size-1) to front (0).


Constructor Summary
ReverseFigureEnumerator(java.util.Vector v)
           
 
Method Summary
 boolean hasMoreElements()
          Returns true if the enumeration contains more elements; false if its empty.
 java.lang.Object nextElement()
          Returns the next element of the enumeration.
 Figure nextFigure()
          Returns the next element casted as a figure of the enumeration.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ReverseFigureEnumerator

public ReverseFigureEnumerator(java.util.Vector v)
Method Detail

hasMoreElements

public boolean hasMoreElements()
Returns true if the enumeration contains more elements; false if its empty.

Specified by:
hasMoreElements in interface java.util.Enumeration

nextElement

public java.lang.Object nextElement()
Returns the next element of the enumeration. Calls to this method will enumerate successive elements.

Specified by:
nextElement in interface java.util.Enumeration
Throws:
java.util.NoSuchElementException - If no more elements exist.

nextFigure

public Figure nextFigure()
Returns the next element casted as a figure of the enumeration. Calls to this method will enumerate successive elements.

Specified by:
nextFigure in interface FigureEnumeration
Throws:
java.util.NoSuchElementException - If no more elements exist.