Class KnuthPossPosIter

    • Constructor Detail

      • KnuthPossPosIter

        public KnuthPossPosIter​(java.util.List elementList,
                                int startPos,
                                int endPos)
        Main constructor
        Parameters:
        elementList - List of Knuth elements
        startPos - starting position, inclusive
        endPos - 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:
        checkNext in class PositionIterator
        Returns:
        true if not at end of sub-sequence with same child layout manager
      • 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:
        getLM in class PositionIterator
        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 passed nextObj is itself a Position, and just returns it. Subclasses for which this is not the case, must provide a suitable override this method.
        Overrides:
        getPos in class PositionIterator
        Parameters:
        nextObj - next object from which to obtain position
        Returns:
        position of next object.