Package org.apache.fop.layoutmgr
Class KnuthPossPosIter
- java.lang.Object
-
- org.apache.fop.layoutmgr.PositionIterator
-
- org.apache.fop.layoutmgr.KnuthPossPosIter
-
- All Implemented Interfaces:
java.util.Iterator<Position>
public class KnuthPossPosIter extends PositionIterator
A dedicatedPositionIteratorthat is backed by an iterator over a list ofKnuthElements.
-
-
Constructor Summary
Constructors Constructor Description KnuthPossPosIter(java.util.List elementList)Auxiliary constructorKnuthPossPosIter(java.util.List elementList, int startPos, int endPos)Main constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected booleancheckNext()ListElementgetKE()Peek at next, returning as ListElement.protected LayoutManagergetLM(java.lang.Object nextObj)protected PositiongetPos(java.lang.Object nextObj)Default implementation assumes that the passednextObjis itself aPosition, and just returns it.Positionnext()-
Methods inherited from class org.apache.fop.layoutmgr.PositionIterator
endIter, getNextChildLM, hasNext, peekNext, remove
-
-
-
-
Constructor Detail
-
KnuthPossPosIter
public KnuthPossPosIter(java.util.List elementList, int startPos, int endPos)Main constructor- Parameters:
elementList- List of Knuth elementsstartPos- starting position, inclusiveendPos- ending position, exclusive
-
KnuthPossPosIter
public KnuthPossPosIter(java.util.List elementList)
Auxiliary constructor- Parameters:
elementList- List of Knuth elements
-
-
Method Detail
-
checkNext
protected boolean checkNext()
- Overrides:
checkNextin classPositionIterator- Returns:
- true if not at end of sub-sequence with same child layout manager
-
next
public Position next()
- Specified by:
nextin interfacejava.util.Iterator<Position>- Overrides:
nextin classPositionIterator
-
getKE
public ListElement getKE()
Peek at next, returning as ListElement.- Returns:
- peek at next as ListElement
-
getLM
protected LayoutManager getLM(java.lang.Object nextObj)
- Overrides:
getLMin classPositionIterator- Parameters:
nextObj- next object from which to obtain position- Returns:
- layout manager
-
getPos
protected Position getPos(java.lang.Object nextObj)
Default implementation assumes that the passednextObjis itself aPosition, and just returns it. Subclasses for which this is not the case, must provide a suitable override this method.- Overrides:
getPosin classPositionIterator- Parameters:
nextObj- next object from which to obtain position- Returns:
- position of next object.
-
-