fop 0.91beta

org.apache.fop.layoutmgr
Class KnuthSequence

java.lang.Object
  |
  +--java.util.AbstractCollection
        |
        +--java.util.AbstractList
              |
              +--java.util.ArrayList
                    |
                    +--org.apache.fop.layoutmgr.KnuthSequence
All Implemented Interfaces:
java.lang.Cloneable, java.util.Collection, java.util.List, java.io.Serializable
Direct Known Subclasses:
AbstractBreaker.BlockSequence

public class KnuthSequence
extends java.util.ArrayList

Represents a list of Knuth elements.

See Also:
Serialized Form

Field Summary
 int ignoreAtEnd
          Number of elements to ignore at the end of the list.
 int ignoreAtStart
          Number of elements to ignore at the beginning of the list.
 
Fields inherited from class java.util.AbstractList
modCount
 
Constructor Summary
KnuthSequence()
          Creates a new and empty list.
KnuthSequence(boolean isInlineSequence)
          Creates a new and empty list, and sets isInlineSequence.
 
Method Summary
 KnuthSequence endSequence()
          Finalizes a Knuth sequence.
 KnuthSequence endSequence(Position breakPosition)
          Finalizes a Knuth sequence.
 KnuthElement getElement(int index)
           
 KnuthElement getLast()
           
 boolean isInlineSequence()
          Is this an inline or a block sequence?
 KnuthElement removeLast()
           
 void startSequence()
          Marks the start of the sequence.
 
Methods inherited from class java.util.ArrayList
add, add, addAll, addAll, clear, clone, contains, ensureCapacity, get, indexOf, isEmpty, lastIndexOf, remove, removeRange, set, size, toArray, toArray, trimToSize
 
Methods inherited from class java.util.AbstractList
equals, hashCode, iterator, listIterator, listIterator, subList
 
Methods inherited from class java.util.AbstractCollection
containsAll, remove, removeAll, retainAll, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.List
containsAll, equals, hashCode, iterator, listIterator, listIterator, remove, removeAll, retainAll, subList
 

Field Detail

ignoreAtStart

public int ignoreAtStart
Number of elements to ignore at the beginning of the list.

ignoreAtEnd

public int ignoreAtEnd
Number of elements to ignore at the end of the list.
Constructor Detail

KnuthSequence

public KnuthSequence()
Creates a new and empty list.

KnuthSequence

public KnuthSequence(boolean isInlineSequence)
Creates a new and empty list, and sets isInlineSequence.
Method Detail

startSequence

public void startSequence()
Marks the start of the sequence.

endSequence

public KnuthSequence endSequence()
Finalizes a Knuth sequence.
Returns:
a finalized sequence.

endSequence

public KnuthSequence endSequence(Position breakPosition)
Finalizes a Knuth sequence.
Parameters:
breakPosition - a Position instance for the last penalty (may be null)
Returns:
a finalized sequence.

getLast

public KnuthElement getLast()

removeLast

public KnuthElement removeLast()

getElement

public KnuthElement getElement(int index)

isInlineSequence

public boolean isInlineSequence()
Is this an inline or a block sequence?
Returns:
true if this is an inline sequence

fop 0.91beta

Copyright 1999-2005 The Apache Software Foundation. All Rights Reserved.