|
org.netbeans.modules.editor.util/1 1.17 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.netbeans.lib.editor.util.AbstractCharSequence
org.netbeans.lib.editor.util.CharSubSequence
public class CharSubSequence
Subsequence of the given character sequence. The backing sequence is considered to be stable i.e. does not change length or content over time.
Nested Class Summary | |
---|---|
static class |
CharSubSequence.StringLike
Subclass providing string-like implementation of hashCode() and equals()
method accepting strings with the same content
like charsequence has. |
Constructor Summary | |
---|---|
CharSubSequence(CharSequence backingSequence,
int start,
int end)
Construct character subsequence with the given backing character sequence. |
Method Summary | |
---|---|
protected CharSequence |
backingSequence()
|
char |
charAt(int index)
Returns the character at the specified index. |
static void |
checkIndexesValid(CharSequence text,
int start,
int end)
Deprecated. use CharSequenceUtilities.checkIndexesValid(CharSequence, int, int) |
int |
length()
Returns the length of this character sequence. |
protected int |
start()
|
Methods inherited from class org.netbeans.lib.editor.util.AbstractCharSequence |
---|
subSequence, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public CharSubSequence(CharSequence backingSequence, int start, int end)
backingSequence
- non-null backing character sequence. It is considered
to be stable and not to change over time.start
- >=0 starting index of the subsequence within
the backing character sequence.end
- >= ending index of the subsequence within
the backing character sequence.
IndexOutOfBoundsException
- if the start or end are not within bounds
of backingSequence.Method Detail |
---|
public static void checkIndexesValid(CharSequence text, int start, int end)
CharSequenceUtilities.checkIndexesValid(CharSequence, int, int)
IndexOutOfBoundsException
- if the start or end are not within bounds
of the given text.protected CharSequence backingSequence()
protected int start()
public int length()
AbstractCharSequence
length
in interface CharSequence
length
in class AbstractCharSequence
public char charAt(int index)
AbstractCharSequence
charAt
in interface CharSequence
charAt
in class AbstractCharSequence
index
- the index of the character to be returned
|
org.netbeans.modules.editor.util/1 1.17 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |