1 *java.lang.CharSequence* *CharSequence* A CharSequence is a readable sequence of
3 public interface interface CharSequence
6 |java.lang.CharSequence_Description|
7 |java.lang.CharSequence_Fields|
8 |java.lang.CharSequence_Constructors|
9 |java.lang.CharSequence_Methods|
11 ================================================================================
13 *java.lang.CharSequence_Methods*
14 |java.lang.CharSequence.charAt(int)|Returns the char value at the specified ind
15 |java.lang.CharSequence.length()|Returns the length of this character sequence.
16 |java.lang.CharSequence.subSequence(int,int)|Returns a new CharSequence that is
17 |java.lang.CharSequence.toString()|Returns a string containing the characters i
19 *java.lang.CharSequence_Description*
21 A CharSequence is a readable sequence of char values. This interface provides
22 uniform, read-only access to many different kinds of char sequences. A char
23 value represents a character in the Basic Multilingual Plane (BMP) or a
24 surrogate. Refer to Unicode Character Representation for details.
26 This interface does not refine the general contracts of the
27 equals(|java.lang.Object|) and hashCode(|java.lang.Object|) methods. The result
28 of comparing two objects that implement CharSequence is therefore, in general,
29 undefined. Each object may be implemented by a different class, and there is no
30 guarantee that each class will be capable of testing its instances for equality
31 with those of the other. It is therefore inappropriate to use arbitrary
32 CharSequence instances as elements in a set or as keys in a map.
36 *java.lang.CharSequence.charAt(int)*
38 public char charAt(int index)
40 Returns the char value at the specified index. An index ranges from zero to
41 length() - 1. The first char value of the sequence is at index zero, the next
42 at index one, and so on, as for array indexing.
44 If the char value specified by the index is a surrogate, the surrogate value is
48 index - the index of the char value to be returned
50 Returns: the specified char value
52 *java.lang.CharSequence.length()*
56 Returns the length of this character sequence. The length is the number of
57 16-bit chars in the sequence.
61 Returns: the number of chars in this sequence
63 *java.lang.CharSequence.subSequence(int,int)*
65 public |java.lang.CharSequence| subSequence(
69 Returns a new CharSequence that is a subsequence of this sequence. The
70 subsequence starts with the char value at the specified index and ends with the
71 char value at index end - 1. The length (in chars) of the returned sequence is
72 end - start, so if start == end then an empty sequence is returned.
75 start - the start index, inclusive
76 end - the end index, exclusive
78 Returns: the specified subsequence
80 *java.lang.CharSequence.toString()*
82 public |java.lang.String| toString()
84 Returns a string containing the characters in this sequence in the same order
85 as this sequence. The length of the string will be the length of this sequence.
89 Returns: a string consisting of exactly this sequence of characters