java.lang.Objectobjectdraw.DrawableIterator
public class DrawableIterator
A DrawableIterator
is a list of DrawableInterface
objects that
you can read through one by one in order. It is used to report a list of objects on
a canvas. The typical usage looks like this:
DrawableIterator iter = canvas.getDrawableIterator();
while(iter.hasNext()) {
DrawableInterface d = iter.next();
// do something with d
}
DrawingCanvas.getDrawableIterator()
Constructor Summary | |
---|---|
protected |
DrawableIterator(ArrayList drawables)
|
Method Summary | |
---|---|
boolean |
hasNext()
Return true if there are more objects left to be read from this iterator,
false if it is at the end of its list. |
DrawableInterface |
next()
Retrieve the next DrawableInterface object from this iterator. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected DrawableIterator(ArrayList drawables)
Method Detail |
---|
public boolean hasNext()
true
if there are more objects left to be read from this iterator,
false
if it is at the end of its list.
public DrawableInterface next()
DrawableInterface
object from this iterator.
DrawableInterface
object from this iterator.
IndexOutOfBoundsException
- if there are no more drawables to
be retrieved.