Package org.sonar.sslr.internal.text
Class CompositeText.CompositeTextCharSequence
- java.lang.Object
-
- org.sonar.sslr.internal.text.CompositeText.CompositeTextCharSequence
-
- All Implemented Interfaces:
CharSequence
,TextCharSequence
- Enclosing class:
- CompositeText
public class CompositeText.CompositeTextCharSequence extends Object implements TextCharSequence
-
-
Constructor Summary
Constructors Constructor Description CompositeTextCharSequence()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description char
charAt(int index)
TextLocation
getCopyLocation(int index)
TextLocation
getLocation(int index)
Text
getText()
int
length()
TextCharSequence
subSequence(int start, int end)
Text
subText(int start, int end)
String
toString()
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.lang.CharSequence
chars, codePoints
-
-
-
-
Method Detail
-
getText
public Text getText()
- Specified by:
getText
in interfaceTextCharSequence
-
length
public int length()
- Specified by:
length
in interfaceCharSequence
- Specified by:
length
in interfaceTextCharSequence
-
charAt
public char charAt(int index)
- Specified by:
charAt
in interfaceCharSequence
- Specified by:
charAt
in interfaceTextCharSequence
-
subSequence
public TextCharSequence subSequence(int start, int end)
- Specified by:
subSequence
in interfaceCharSequence
- Specified by:
subSequence
in interfaceTextCharSequence
- Parameters:
start
- the start index, inclusiveend
- the end index, exclusive
-
subText
public Text subText(int start, int end)
- Specified by:
subText
in interfaceTextCharSequence
- Parameters:
start
- the start index, inclusiveend
- the end index, exclusive
-
getLocation
public TextLocation getLocation(int index)
- Specified by:
getLocation
in interfaceTextCharSequence
-
getCopyLocation
public TextLocation getCopyLocation(int index)
-
toString
public String toString()
- Specified by:
toString
in interfaceCharSequence
- Specified by:
toString
in interfaceTextCharSequence
- Overrides:
toString
in classObject
- Returns:
- a string containing the characters in this sequence in the same order as this sequence
-
-