|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.unitesk.atp.text.location.Position
public class Position
Text position is specified by line and column. Valid lines and columns are counted from 1.
Constructor Summary | |
---|---|
Position()
Stub constructor sets line and column in (0,0) . |
|
Position(int line,
int column)
Creates position with the specified line and column. |
Method Summary | |
---|---|
boolean |
equals(Object obj)
Positions are equal if lines and columns are equal. |
int |
getColumn()
Returns the column of this position. |
int |
getLine()
Returns the line of this position. |
int |
hashCode()
|
void |
setColumn(int column)
Sets the new value of column of this position. |
void |
setLine(int line)
Sets the new value of line of this position. |
String |
toString()
Returns the string representation of this position. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Position()
(0,0)
.
They are stub values because real lines and columns are counted from 1.
public Position(int line, int column)
line
- The line of new position.column
- The column of new position.Method Detail |
---|
public int getLine()
public void setLine(int line)
line
- value to be set as line.public int getColumn()
public void setColumn(int column)
column
- value to be set as column.public String toString()
toString
in class Object
"(${line},${column})"
.
Invalid (non-positive) value of line or column
is represented as '?'
.public boolean equals(Object obj)
equals
in class Object
obj
- The object to compare with.public int hashCode()
hashCode
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |