@Immutable
public final class SourcePosition
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static SourcePosition |
UNKNOWN |
Modifier | Constructor and Description |
---|---|
|
SourcePosition(int lineNumber,
int column,
int offset) |
|
SourcePosition(int startLine,
int startColumn,
int startOffset,
int endLine,
int endColumn,
int endOffset) |
protected |
SourcePosition(SourcePosition copy) |
Modifier and Type | Method and Description |
---|---|
int |
compareEnd(SourcePosition other)
Compares the end of this SourcePosition with another.
|
int |
compareStart(SourcePosition other)
Compares the start of this SourcePosition with another.
|
boolean |
equals(java.lang.Object obj) |
int |
getEndColumn() |
int |
getEndLine() |
int |
getEndOffset() |
int |
getStartColumn() |
int |
getStartLine() |
int |
getStartOffset() |
int |
hashCode() |
java.lang.String |
toString()
Outputs positions as human-readable formatted strings.
|
@NonNull public static final SourcePosition UNKNOWN
public SourcePosition(int startLine, int startColumn, int startOffset, int endLine, int endColumn, int endOffset)
public SourcePosition(int lineNumber, int column, int offset)
protected SourcePosition(SourcePosition copy)
public java.lang.String toString()
84 84-86 84:5 84:5-28 85:5-86:47
toString
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public int getStartLine()
public int getStartColumn()
public int getStartOffset()
public int getEndLine()
public int getEndColumn()
public int getEndOffset()
public int compareStart(@NonNull SourcePosition other)
public int compareEnd(@NonNull SourcePosition other)