|
FlexDoc/Javadoc 2.0 Demo Java Doc |
This interface does not refine the general contracts of the equals and hashCode methods. The result of testing two objects that implement CharSequence for equality is therefore, in general, undefined. Each object may be implemented by a different class, and there is no guarantee that each class will be capable of testing its instances for equality with those of the other. It is therefore inappropriate to use arbitrary CharSequence instances as elements in a set or as keys in a map.
Method Summary |
||
char |
charAt(int index)
Returns the char value at the specified index.
|
|
default IntStream |
chars()
Returns a stream of int zero-extending the char values
from this sequence.
|
|
default IntStream |
Returns a stream of code point values from this sequence.
|
|
static int |
Compares two CharSequence instances lexicographically.
|
|
default boolean |
isEmpty()
Returns true if this character sequence is empty.
|
|
int |
length()
Returns the length of this character sequence.
|
|
subSequence(int start, int end)
Returns a CharSequence that is a subsequence of this sequence.
|
||
toString()
Returns a string containing the characters in this sequence in the same
order as this sequence.
|
int length |
() |
char charAt |
(int index) |
If the char value specified by the index is a surrogate, the surrogate value is returned.
default boolean isEmpty |
() |
CharSequence subSequence |
(int start, int end) |
String toString |
() |
default IntStream chars |
() |
The stream binds to this sequence when the terminal stream operation commences (specifically, for mutable sequences the spliterator for the stream is late-binding). If the sequence is modified during that operation then the result is undefined.
default IntStream codePoints |
() |
The stream binds to this sequence when the terminal stream operation commences (specifically, for mutable sequences the spliterator for the stream is late-binding). If the sequence is modified during that operation then the result is undefined.
static int compare |
The lexicographical ordering of CharSequence is defined as follows. Consider a CharSequence cs of length len to be a sequence of char values, cs[0] to cs[len-1]. Suppose k is the lowest index at which the corresponding char values from each sequence differ. The lexicographic ordering of the sequences is determined by a numeric comparison of the char values cs1[k] with cs2[k]. If there is no such index k, the shorter sequence is considered lexicographically less than the other. If the sequences have the same length, the sequences are considered lexicographically equal.
|
FlexDoc/Javadoc 2.0 Demo Java Doc |