org.sonar.sslr.internal.text
Class PlainText
java.lang.Object
org.sonar.sslr.internal.text.AbstractText
org.sonar.sslr.internal.text.PlainText
- All Implemented Interfaces:
- CharSequence, Text, TextCharSequence
- Direct Known Subclasses:
- LocatedText
public class PlainText
- extends AbstractText
- implements TextCharSequence
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PlainText
public PlainText(char[] chars)
subText
public Text subText(int start,
int end)
- Specified by:
subText in interface TextCharSequence
- Parameters:
start - the start index, inclusiveend - the end index, exclusive
getTransformationDepth
protected int getTransformationDepth()
- Specified by:
getTransformationDepth in class AbstractText
getText
public Text getText()
- Specified by:
getText in interface TextCharSequence
length
public int length()
- Specified by:
length in interface CharSequence- Specified by:
length in interface Text- Specified by:
length in interface TextCharSequence
- Returns:
- the number of characters in this text
toCharArray
public void toCharArray(int srcPos,
char[] dest,
int destPos,
int length)
- Specified by:
toCharArray in class AbstractText
sequence
public TextCharSequence sequence()
- Description copied from interface:
Text
- Provides sequential access to characters.
- Specified by:
sequence in interface Text
charAt
public char charAt(int index)
- Specified by:
charAt in interface CharSequence- Specified by:
charAt in interface TextCharSequence
subSequence
public TextCharSequence subSequence(int from,
int to)
- Specified by:
subSequence in interface CharSequence- Specified by:
subSequence in interface TextCharSequence
- Parameters:
from - the start index, inclusiveto - the end index, exclusive
getLocation
public TextLocation getLocation(int index)
- Specified by:
getLocation in interface TextCharSequence
Copyright © 2009-2014 SonarSource. All Rights Reserved.