public class

Line

extends Object
implements ILine
java.lang.Object
   ↳ com.pnfsoftware.jeb.core.output.text.impl.Line

Class Overview

A simple implementation of the line interface.

Summary

[Expand]
Inherited Fields
From interface com.pnfsoftware.jeb.core.output.text.ILine
Public Constructors
Line(CharSequence text)
Create a new line without items.
Line(CharSequence text, List<TextItem> items)
Create a new line.
Line(CharSequence text, List<TextItem> items, List<TextMark> marks)
Create a new line.
Public Methods
void addItem(TextItem item)
Add TextItem to the current Line.
void addMark(TextMark mark)
Record a mark in the current line.
List<TextItem> getItems()
Get the list of text items within the current line.
List<TextMark> getMarks()
Get the list of marks for this line.
CharSequence getText()
Get the line text.
void setText(CharSequence text)
String toString()
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.pnfsoftware.jeb.core.output.text.ILine

Public Constructors

public Line (CharSequence text)

Create a new line without items.

Parameters
text the line text

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

public Line (CharSequence text, List<TextItem> items, List<TextMark> marks)

Create a new line.

Public Methods

public void addItem (TextItem item)

Add TextItem to the current Line. This method preserves TextItem order based on the getOffset().

public void addMark (TextMark mark)

Record a mark in the current line.

public List<TextItem> getItems ()

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.

Returns
  • a list, possibly empty, of text items

public List<TextMark> getMarks ()

Get the list of marks for this line.

public CharSequence getText ()

Get the line text. It is the responsibility of the implementor to make sure that lines do not contain CR/LF characters.

Returns
  • the line

public void setText (CharSequence text)

public String toString ()