@Immutable public final class Position extends Object
Modifier and Type | Field and Description |
---|---|
private int |
column |
static Position |
EMPTY_CONTENT_POSITION
The position is used when there is no content.
|
private int |
indexInContent |
private int |
line |
Constructor and Description |
---|
Position(int indexInContent,
int line,
int column) |
Modifier and Type | Method and Description |
---|---|
Position |
add(Position position)
Return a new position that is the addition of this position and that supplied.
|
int |
column()
Get the 1-based column number of the character.
|
int |
hashCode() |
int |
index()
Get the 0-based index of this position in the content character array.
|
int |
line()
Get the 1-based line number of the character.
|
String |
toString() |
public static final Position EMPTY_CONTENT_POSITION
private final int line
private final int column
private final int indexInContent
public int index()
public int column()
public int line()
Copyright © 2016 JBoss by Red Hat. All rights reserved.