Package org.eclipse.xtext.parser.packrat
Interface ICharSequenceWithOffset
-
- All Superinterfaces:
java.lang.CharSequence
- All Known Implementing Classes:
AbstractPackratParser
,DebugCharSequenceWithOffset
,StringWithOffset
,TerminalsPackratParser
public interface ICharSequenceWithOffset extends java.lang.CharSequence
A character sequence, that can be used as a kind of an enumerator via its offset state.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description int
getOffset()
Retrieves the current state of the offset property.void
incOffset()
Increments the offset by one.void
incOffset(int amount)
Increments the offset by the given amount.void
setOffset(int offset)
Random access to modify the offset.
-
-
-
Method Detail
-
getOffset
int getOffset()
Retrieves the current state of the offset property.- Returns:
- the current offset.
-
incOffset
void incOffset()
Increments the offset by one.
-
incOffset
void incOffset(int amount)
Increments the offset by the given amount. Can be used to decrement the offset.- Parameters:
amount
- the number of offset that should be shifted.
-
setOffset
void setOffset(int offset)
Random access to modify the offset. Can be set independently from the length of the char sequence.- Parameters:
offset
- the new offset.
-
-