Back to index

moin  1.9.0~rc2
ReverseFigureEnumerator.java
Go to the documentation of this file.
00001 /*
00002  * @(#)ReverseFigureEnumerator.java 5.1
00003  *
00004  */
00005 
00006 package CH.ifa.draw.standard;
00007 
00008 import java.util.*;
00009 import CH.ifa.draw.util.ReverseVectorEnumerator;
00010 import CH.ifa.draw.framework.*;
00011 
00015 public final class ReverseFigureEnumerator implements FigureEnumeration {
00016     Vector v;
00017     ReverseVectorEnumerator fEnumeration;
00018 
00019     public ReverseFigureEnumerator(Vector v) {
00020         this.v = v;
00021            fEnumeration = new ReverseVectorEnumerator(v);
00022     }
00023 
00028     public boolean hasMoreElements() {
00029            return fEnumeration.hasMoreElements();
00030     }
00031 
00037     public Object nextElement() {
00038         return fEnumeration.nextElement();
00039     }
00040 
00046     public Figure nextFigure() {
00047         return (Figure)fEnumeration.nextElement();
00048     }
00049 
00054     public boolean contains(Figure figure) {
00055         return v.contains(figure);
00056     }
00057 }