|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjlibs.core.lang.CharArray
public class CharArray
This is CharSequence implementation.
set(char[], int, int)
buffer(), offset() and length()
| Constructor Summary | |
|---|---|
CharArray(char[] buff)
Allocates a new CharArray so that it represents the sequence of
characters currently contained in the character array argument. |
|
CharArray(char[] buff,
int offset,
int length)
Allocates a new CharArray that contains characters from a subarray
of the character array argument. |
|
| Method Summary | |
|---|---|
CharArrayReader |
asReader()
creates a new CharArrayReader to read contents of this chararray |
char[] |
buffer()
returns the char buffer used by this instance |
char |
charAt(int index)
|
int |
length()
|
int |
offset()
returns the index of first character in char buffer |
void |
set(char[] buff,
int offset,
int length)
replaces the internal char buffer with the given char array. |
CharSequence |
subSequence(int start,
int end)
|
char[] |
toCharArray(boolean clone)
|
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public CharArray(char[] buff)
CharArray so that it represents the sequence of
characters currently contained in the character array argument. The
contents of the character array are not copied;
buff - value of the chararray
public CharArray(char[] buff,
int offset,
int length)
CharArray that contains characters from a subarray
of the character array argument. The offset argument is the
index of the first character of the subarray and the length
argument specifies the length of the subarray. The contents of the
subarray are not copied;
buff - Array that is the source of charactersoffset - The initial offsetlength - The length
IndexOutOfBoundsException - If the offset and length arguments index
characters outside the bounds of the buff array| Method Detail |
|---|
public void set(char[] buff,
int offset,
int length)
buff - Array that is the source of charactersoffset - The initial offsetlength - The lengthpublic char[] buffer()
public int offset()
public int length()
length in interface CharSequencepublic char[] toCharArray(boolean clone)
public char charAt(int index)
charAt in interface CharSequence
public CharSequence subSequence(int start,
int end)
subSequence in interface CharSequencepublic CharArrayReader asReader()
CharArrayReader to read contents of this chararray
public String toString()
toString in interface CharSequencetoString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||