Package uk.blankaspect.common.json
Class JsonText.Line
java.lang.Object
uk.blankaspect.common.json.JsonText.Line
- All Implemented Interfaces:
 ITextLine
- Enclosing class:
 JsonText
This class encapsulates a line of text, which consists of a sequence of spans.
- 
Field Summary
Fields inherited from interface uk.blankaspect.common.text.ITextLine
OFFSET_COMPARATOR - 
Method Summary
Modifier and TypeMethodDescriptionbooleanisEmpty()Returnstrueif this line is empty.voidCombines adjacent spans that are associated with the same token.intnumSpans()Returns the number of spans of text that are associated with this line.intoffset()Returns the offset from the start of the text to the start of this line.spans()Returns a list of the spans of text that are associated with this line.text()Returns the text of this line.toString() 
- 
Method Details
- 
text
Returns the text of this line. - 
offset
public int offset()Returns the offset from the start of the text to the start of this line. - 
spans
Returns a list of the spans of text that are associated with this line. - 
numSpans
public int numSpans()Returns the number of spans of text that are associated with this line. - 
toString
 - 
isEmpty
public boolean isEmpty()Returnstrueif this line is empty.- Returns:
 trueif this line is empty.
 - 
normaliseSpans
public void normaliseSpans()Combines adjacent spans that are associated with the same token. 
 -