public abstract class AbstractCharSequence extends Object implements CharSequence
String
-like implementation
of hashCode()
and equals()
.Modifier and Type | Class and Description |
---|---|
static class |
AbstractCharSequence.StringLike
Subclass providing string-like implementation
of
hashCode() and equals()
method accepting strings with the same content
like charsequence has. |
Constructor and Description |
---|
AbstractCharSequence() |
Modifier and Type | Method and Description |
---|---|
abstract char |
charAt(int index)
Returns the character at the specified index.
|
abstract int |
length()
Returns the length of this character sequence.
|
CharSequence |
subSequence(int start,
int end)
Return subsequence of this character sequence.
|
String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
chars, codePoints, compare, isEmpty
public abstract int length()
length
in interface CharSequence
public abstract char charAt(int index)
charAt
in interface CharSequence
index
- the index of the character to be returnedIndexOutOfBoundsException
- if the index argument is negative or not less than
length()public CharSequence subSequence(int start, int end)
subSequence
in interface CharSequence
start
- >=0 starting index of the subsequence within this
character sequence.end
- >=0 ending index of the subsequence within this
character sequence.public String toString()
toString
in interface CharSequence
toString
in class Object