Package jjparse.input
Class CharacterInput.CodePointPosition
- Enclosing class:
CharacterInput
Represents a
Input<Character>.Position in this CharacterInput that is aware of the underlying unicode code points.- Author:
- Björn Lötters
- See Also:
-
Field Summary
Fields inherited from class jjparse.input.Input.Position
input, offset -
Method Summary
Modifier and TypeMethodDescriptiondescribe()intReturns the code point that occurs in the associatedCharacterInputat thisCharacterInput.CodePointPosition.intComputes the column number that corresponds to thisCharacterInput.CodePointPositionas it is perceived by the user.intComputes the line number that corresponds to thisCharacterInput.CodePointPositionas it is perceived by the user.toString()Methods inherited from class jjparse.input.Input.Position
equals, hashCode
-
Method Details
-
getCodePoint
public int getCodePoint()Returns the code point that occurs in the associatedCharacterInputat thisCharacterInput.CodePointPosition.- Returns:
- The unicode code point at this
CharacterInput.CodePointPosition.
-
getLineNumber
public int getLineNumber()Computes the line number that corresponds to thisCharacterInput.CodePointPositionas it is perceived by the user. That is to say, this is not necessarily the character offset in thisCharacterInput.CodePointPositionbut the unicode code point offset.- Returns:
- The line number of this
CharacterInput.CodePointPosition.
-
getColumnNumber
public int getColumnNumber()Computes the column number that corresponds to thisCharacterInput.CodePointPositionas it is perceived by the user. That is to say, this is not necessarily the character offset in thisCharacterInput.CodePointPositionbut the unicode code point offset relative to the corresponding line offset.- Returns:
- The column number of this
CharacterInput.CodePointPosition.
-
describe
Description copied from class:Input.Position -
toString
-