Package jpicedt.graphic.model
Class DefaultPointIndexIterator
- java.lang.Object
-
- jpicedt.graphic.model.DefaultPointIndexIterator
-
- All Implemented Interfaces:
PointIndexIterator
public class DefaultPointIndexIterator extends java.lang.Object implements PointIndexIterator
Default implementation of the PointIndexIterator interface, which simply iterates in ascending order over all control points.
-
-
Constructor Summary
Constructors Constructor Description DefaultPointIndexIterator(Element e)create a new PointIndexIterator for the given Element
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanhasNext()Returns true if the iteration has more elementsintnext()Returns the index of the next PicPoint in the iteration.voidreset()reset the state of this iterator
-
-
-
Field Detail
-
counter
protected int counter
-
elem
protected Element elem
-
-
Constructor Detail
-
DefaultPointIndexIterator
public DefaultPointIndexIterator(Element e)
create a new PointIndexIterator for the given Element
-
-
Method Detail
-
hasNext
public boolean hasNext()
Returns true if the iteration has more elements- Specified by:
hasNextin interfacePointIndexIterator- Returns:
- true if the iterator has more elements
-
next
public int next()
Returns the index of the next PicPoint in the iteration.- Specified by:
nextin interfacePointIndexIterator- Returns:
- the index of the next user-controlled point in the iteration
-
reset
public void reset()
Description copied from interface:PointIndexIteratorreset the state of this iterator- Specified by:
resetin interfacePointIndexIterator
-
-