us.zuercher.gpx2map.plotter
Class AbstractShapePixelRowIterator

java.lang.Object
  extended by us.zuercher.gpx2map.plotter.AbstractShapePixelRowIterator
All Implemented Interfaces:
Iterator<List<Pixel>>

public class AbstractShapePixelRowIterator
extends Object
implements Iterator<List<Pixel>>

AbstractShapePixelRowIterator wraps an Iterator> with Z-ordering information for the pixels.

Author:
Stephan Zuercher

Field Summary
private  Iterator<List<Pixel>> iterator
          Wrapped iterator.
private  int zOrdering
          Z-ordering for the pixels.
 
Constructor Summary
AbstractShapePixelRowIterator(Iterator<List<Pixel>> iterator, int zOrdering)
          Constructs a new AbstractShapePixelRowIterator that wraps the given iterator and z-ordering.
 
Method Summary
 int getZOrdering()
          Returns the Z-ordering value for this row.
 boolean hasNext()
          Returns true if the underlying pixel row iterator has more pixel rows.
 List<Pixel> next()
          Returns the next row of pixels.
 void remove()
          Removes the current of pixels.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

iterator

private final Iterator<List<Pixel>> iterator
Wrapped iterator.


zOrdering

private final int zOrdering
Z-ordering for the pixels.

Constructor Detail

AbstractShapePixelRowIterator

AbstractShapePixelRowIterator(Iterator<List<Pixel>> iterator,
                              int zOrdering)
Constructs a new AbstractShapePixelRowIterator that wraps the given iterator and z-ordering.

Parameters:
iterator - iterator of pixel rows
zOrdering - z-ordering of pixels
Method Detail

hasNext

public boolean hasNext()
Returns true if the underlying pixel row iterator has more pixel rows.

Specified by:
hasNext in interface Iterator<List<Pixel>>
Returns:
true if the underlying pixel row iterator has more pixel rows.
See Also:
Iterator.hasNext()

next

public List<Pixel> next()
Returns the next row of pixels.

Specified by:
next in interface Iterator<List<Pixel>>
Returns:
the next row of pixels.
See Also:
Iterator.next()

remove

public void remove()
Removes the current of pixels.

Specified by:
remove in interface Iterator<List<Pixel>>
See Also:
Iterator.remove()

getZOrdering

public int getZOrdering()
Returns the Z-ordering value for this row.

Returns:
the Z-ordering value for this row.
See Also:
AbstractShape.getZOrdering()