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 intgetOffset()Retrieves the current state of the offset property.voidincOffset()Increments the offset by one.voidincOffset(int amount)Increments the offset by the given amount.voidsetOffset(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:ICharSequenceWithOffsetRetrieves the current state of the offset property.- Specified by:
getOffsetin interfaceICharSequenceWithOffset- Returns:
- the current offset.
-
incOffset
public void incOffset()
Description copied from interface:ICharSequenceWithOffsetIncrements the offset by one.- Specified by:
incOffsetin interfaceICharSequenceWithOffset
-
incOffset
public void incOffset(int amount)
Description copied from interface:ICharSequenceWithOffsetIncrements the offset by the given amount. Can be used to decrement the offset.- Specified by:
incOffsetin interfaceICharSequenceWithOffset- Parameters:
amount- the number of offset that should be shifted.
-
setOffset
public void setOffset(int offset)
Description copied from interface:ICharSequenceWithOffsetRandom access to modify the offset. Can be set independently from the length of the char sequence.- Specified by:
setOffsetin interfaceICharSequenceWithOffset- Parameters:
offset- the new offset.
-
-