|
fop 1.1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.fop.layoutmgr.PositionIterator
public class PositionIterator
An iterator over Position instances, that is wrapped around
another 'parent' Iterator. The parent can be either another
PositionIterator, or an iterator over KnuthElements,
for example.
The next() method always returns a Position. The
getPos(Object) method can be overridden in subclasses
to take care of obtaining the LayoutManager or Position
from the object returned by the parent iterator's next() method.
| Constructor Summary | |
|---|---|
PositionIterator(java.util.Iterator parentIter)
Construct position iterator. |
|
| Method Summary | |
|---|---|
protected boolean |
checkNext()
|
protected void |
endIter()
end (reset) iterator |
protected LayoutManager |
getLM(java.lang.Object nextObj)
|
LayoutManager |
getNextChildLM()
|
protected Position |
getPos(java.lang.Object nextObj)
Default implementation assumes that the passed nextObj is itself a Position, and just returns it. |
boolean |
hasNext()
|
Position |
next()
|
java.lang.Object |
peekNext()
|
void |
remove()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public PositionIterator(java.util.Iterator parentIter)
parentIter - an iterator to use as parent| Method Detail |
|---|
public LayoutManager getNextChildLM()
protected LayoutManager getLM(java.lang.Object nextObj)
nextObj - next object from which to obtain position
protected Position getPos(java.lang.Object nextObj)
nextObj is itself a Position, and just returns it.
Subclasses for which this is not the case, must provide a
suitable override this method.
nextObj - next object from which to obtain position
protected boolean checkNext()
protected void endIter()
public boolean hasNext()
hasNext in interface java.util.Iterator<Position>
public Position next()
throws java.util.NoSuchElementException
next in interface java.util.Iterator<Position>java.util.NoSuchElementExceptionpublic java.lang.Object peekNext()
public void remove()
throws java.lang.UnsupportedOperationException
remove in interface java.util.Iterator<Position>java.lang.UnsupportedOperationException
|
fop 1.1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||