Class DebugCharSequenceWithOffset
- java.lang.Object
-
- org.eclipse.xtext.parser.packrat.debug.DebugCharSequence
-
- org.eclipse.xtext.parser.packrat.debug.DebugCharSequenceWithOffset
-
- All Implemented Interfaces:
java.lang.CharSequence
,ICharSequenceWithOffset
public class DebugCharSequenceWithOffset extends DebugCharSequence implements ICharSequenceWithOffset
-
-
Constructor Summary
Constructors Constructor Description DebugCharSequenceWithOffset(ICharSequenceWithOffset delegate)
-
Method Summary
All Methods Instance Methods Concrete 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.-
Methods inherited from class org.eclipse.xtext.parser.packrat.debug.DebugCharSequence
charAt, length, subSequence, toString
-
-
-
-
Constructor Detail
-
DebugCharSequenceWithOffset
public DebugCharSequenceWithOffset(ICharSequenceWithOffset delegate)
-
-
Method Detail
-
getOffset
public int getOffset()
Description copied from interface:ICharSequenceWithOffset
Retrieves the current state of the offset property.- Specified by:
getOffset
in interfaceICharSequenceWithOffset
- Returns:
- the current offset.
-
incOffset
public void incOffset()
Description copied from interface:ICharSequenceWithOffset
Increments the offset by one.- Specified by:
incOffset
in interfaceICharSequenceWithOffset
-
incOffset
public void incOffset(int amount)
Description copied from interface:ICharSequenceWithOffset
Increments the offset by the given amount. Can be used to decrement the offset.- Specified by:
incOffset
in interfaceICharSequenceWithOffset
- Parameters:
amount
- the number of offset that should be shifted.
-
setOffset
public void setOffset(int offset)
Description copied from interface:ICharSequenceWithOffset
Random access to modify the offset. Can be set independently from the length of the char sequence.- Specified by:
setOffset
in interfaceICharSequenceWithOffset
- Parameters:
offset
- the new offset.
-
-