|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.modeshape.common.text.Position
@Immutable public final class Position
A class that represents the position of a particular character in terms of the lines and columns of a character sequence.
Field Summary | |
---|---|
static Position |
EMPTY_CONTENT_POSITION
The position is used when there is no content. |
Constructor Summary | |
---|---|
Position(int indexInContent,
int line,
int column)
|
Method Summary | |
---|---|
Position |
add(Position position)
Return a new position that is the addition of this position and that supplied. |
int |
getColumn()
Get the 1-based column number of the character. |
int |
getIndexInContent()
Get the 0-based index of this position in the content character array. |
int |
getLine()
Get the 1-based line number of the character. |
int |
hashCode()
|
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final Position EMPTY_CONTENT_POSITION
Constructor Detail |
---|
public Position(int indexInContent, int line, int column)
Method Detail |
---|
public int getIndexInContent()
public int getColumn()
public int getLine()
public int hashCode()
hashCode
in class Object
Object.hashCode()
public String toString()
toString
in class Object
Object.toString()
public Position add(Position position)
position
- the position to add to this object; may not be null
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |