Class InlineKnuthSequence

All Implemented Interfaces:
Serializable, Cloneable, Iterable, Collection, List, RandomAccess

public class InlineKnuthSequence extends KnuthSequence
Represents a list of inline Knuth elements. If closed, it represents all elements of a Knuth paragraph.
See Also:
  • Constructor Details

    • InlineKnuthSequence

      public InlineKnuthSequence()
      Creates a new and empty list.
    • InlineKnuthSequence

      public InlineKnuthSequence(List list)
      Creates a new list from an existing list.
      Parameters:
      list - The list from which to create the new list.
  • Method Details

    • isInlineSequence

      public boolean isInlineSequence()
      Is this an inline or a block sequence?
      Specified by:
      isInlineSequence in class KnuthSequence
      Returns:
      false
    • canAppendSequence

      public boolean canAppendSequence(KnuthSequence sequence)
      Can sequence be appended to this sequence?
      Specified by:
      canAppendSequence in class KnuthSequence
      Parameters:
      sequence - The sequence that may be appended.
      Returns:
      whether the sequence can be appended to this sequence.
    • appendSequence

      public boolean appendSequence(KnuthSequence sequence)
      Append sequence to this sequence if it can be appended.
      Specified by:
      appendSequence in class KnuthSequence
      Parameters:
      sequence - The sequence that is to be appended.
      Returns:
      whether the sequence was succesfully appended to this sequence.
    • appendSequence

      public boolean appendSequence(KnuthSequence sequence, boolean keepTogether, BreakElement breakElement)
      Append sequence to this sequence if it can be appended.
      Specified by:
      appendSequence in class KnuthSequence
      Parameters:
      sequence - The sequence that is to be appended.
      keepTogether - Whether the two sequences must be kept together.
      breakElement - The BreakElement that may be inserted between the two sequences.
      Returns:
      whether the sequence was succesfully appended to this sequence.
    • endSequence

      public KnuthSequence endSequence()
      Finalizes a Knuth sequence.
      Specified by:
      endSequence in class KnuthSequence
      Returns:
      a finalized sequence.
    • addALetterSpace

      public void addALetterSpace()
      Add letter space.