Package com.amazon.ion
Interface TextSpan
public interface TextSpan
Exposes the positions of a
Span in the form of one-based
line and column numbers within the source text stream.
WARNING: This interface should not be implemented or extended by code outside of this library.
As with all spans, positions lie between values, and when the start and finish positions are equal, the span is said to be empty.
To get one of these from a Span, use
asFacet(TextSpan.class) or one of
the helpers from Spans.
-
Method Summary
Modifier and TypeMethodDescriptionlongReturns the column number of this span's finish position, counting from one.longReturns the line number of this span's finish position, counting from one.longReturns the column number of this span's start position, counting from one.longReturns the line number of this span's start position, counting from one.
-
Method Details
-
getStartLine
long getStartLine()Returns the line number of this span's start position, counting from one. -
getStartColumn
long getStartColumn()Returns the column number of this span's start position, counting from one. -
getFinishLine
long getFinishLine()Returns the line number of this span's finish position, counting from one. In most cases, the finish position is implicit and this method returns-1. That's since in general (notably for containers) the finish offset can't be determined without significant effort to parse to the end of the value. -
getFinishColumn
long getFinishColumn()Returns the column number of this span's finish position, counting from one. In most cases, the finish position is implicit and this method returns-1. That's since in general (notably for containers) the finish offset can't be determined without significant effort to parse to the end of the value.
-