|
abc4j API Specification | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectscanner.CharStreamPosition
public class CharStreamPosition
This class defines positions in a stream of characters.
| Constructor Summary | |
|---|---|
CharStreamPosition()
Creates a new position with default values (column=1, line=1, offset=0). |
|
CharStreamPosition(CharStreamPosition pos)
Creates a new position a the same place as the given one. |
|
CharStreamPosition(int column,
int line,
int charactersOffset)
Creates a new position at the specified place. |
|
| Method Summary | |
|---|---|
java.lang.Object |
clone()
Returns a new position at the same place as this one. |
int |
getCharactersOffset()
Returns the character offset. |
int |
getColumn()
Returns the column of this position. |
int |
getLine()
Returns the line of this position. |
void |
setCharactersOffset(int charactersOffset)
Sets the offset of this position. |
void |
setColumn(int column)
Sets the column of this position. |
void |
setLine(int line)
Sets the line of this position. |
void |
setPosition(CharStreamPosition pos)
Sets this position to the same place as the specified one. |
void |
setPosition(int column,
int line,
int offset)
Sets this position to the specified place. |
java.lang.String |
toString()
Returns a string representation this object. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public CharStreamPosition()
public CharStreamPosition(CharStreamPosition pos)
pos - The position to be take as reference to create this new position.
public CharStreamPosition(int column,
int line,
int charactersOffset)
column - This position's column.line - This position's line.charactersOffset - This position's offset.| Method Detail |
|---|
public void setPosition(CharStreamPosition pos)
pos - The position where this one has to be set.
public void setPosition(int column,
int line,
int offset)
column - This position's new colum.line - This position's new line.offset - This position's new offset.public void setColumn(int column)
column - This position's new colum.public void setLine(int line)
line - This position's new line.public void setCharactersOffset(int charactersOffset)
charactersOffset - The character offset to be applied to this position.public int getColumn()
public int getLine()
public int getCharactersOffset()
public java.lang.Object clone()
clone in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Object
|
abc4j API Specification | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||