java.lang.Object
com.pnfsoftware.jeb.core.output.text.impl.Line
All Implemented Interfaces:
ILine

@Ser public class Line extends Object implements ILine
A simple implementation of the line interface.
  • Constructor Details

    • Line

      public Line(CharSequence text)
      Create a new line without items.
      Parameters:
      text - the line text
    • Line

      public Line(CharSequence text, List<TextItem> items)
      Create a new line.
      Parameters:
      text - mandatory text line, cannot contain new-line characters
      items - mandatory items, can be empty at best
    • Line

      public Line(CharSequence text, List<TextItem> items, List<TextMark> marks)
      Create a new line.
      Parameters:
      text -
      items -
      marks -
  • Method Details

    • getText

      public CharSequence getText()
      Description copied from interface: ILine
      Get the line text. It is the responsibility of the implementor to make sure that lines do not contain CR/LF characters.
      Specified by:
      getText in interface ILine
      Returns:
      the line
    • setText

      public void setText(CharSequence text)
    • getItems

      public List<TextItem> getItems()
      Description copied from interface: ILine
      Get the list of text items within the current line. It is the responsibility of the implementor to make sure that items are non overlapping and are sorted.
      Specified by:
      getItems in interface ILine
      Returns:
      a list, possibly empty, of text items
    • addItem

      public void addItem(TextItem item)
      Add TextItem to the current Line. This method preserves TextItem order based on the TextItem.getOffset().
      Parameters:
      item -
    • getMarks

      public List<TextMark> getMarks()
      Description copied from interface: ILine
      Get the list of marks for this line.
      Specified by:
      getMarks in interface ILine
      Returns:
    • addMark

      public void addMark(TextMark mark)
      Record a mark in the current line.
      Parameters:
      mark -
    • toString

      public String toString()
      Overrides:
      toString in class Object