Package codeanalysis.text
Class TextLine
java.lang.Object
codeanalysis.text.TextLine
The TextLine class represents a line of text in a source file.
It defines the start position, length, and end position of the line.
- Version:
- 1.0
- Author:
- Siyabend Urun
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionTextLine(SourceText text, int start, int length, int lengthIncludingLineBreak) Creates a new instance of the TextLine class with the specified start position, length, and length including line break. -
Method Summary
Modifier and TypeMethodDescriptionintgetEnd()Retrieves the end position of the text line.intRetrieves the length of the text line.intRetrieves the length of the text line including line break.getSpan()Retrieves the span of the text line.Retrieves the span of the text line including line break.intgetStart()Retrieves the start position of the text line.getText()Retrieves the source text.toString()Retrieves the string representation of the text line.
-
Constructor Details
-
TextLine
Creates a new instance of the TextLine class with the specified start position, length, and length including line break.- Parameters:
text- The source text.start- The start position of the text line.length- The length of the text line.lengthIncludingLineBreak- The length of the text line including line break.
-
-
Method Details
-
getText
Retrieves the source text.- Returns:
- The source text.
-
getStart
public int getStart()Retrieves the start position of the text line.- Returns:
- The start position.
-
getLength
public int getLength()Retrieves the length of the text line.- Returns:
- The length.
-
getEnd
public int getEnd()Retrieves the end position of the text line.- Returns:
- The end position.
-
getLengthIncludingLineBreak
public int getLengthIncludingLineBreak()Retrieves the length of the text line including line break.- Returns:
- The length including line break.
-
getSpan
Retrieves the span of the text line.- Returns:
- The span.
-
getSpanIncludingLineBreak
Retrieves the span of the text line including line break.- Returns:
- The span including line break.
-
toString
Retrieves the string representation of the text line.
-