public final class CharArrayWrapperSequence extends Object implements CharSequence, Cloneable
Wrapper class that allows the use of char[] objects as CharSequences,
without the need to duplicate the char[] contents in memory (as would happen
if a String was created from the char[]).
Note that a reference to the original char[] is kept, so modifying this char[] outside this object will result in this object's contents being modified too.
Objects of this class are thread-safe.
| Constructor and Description |
|---|
CharArrayWrapperSequence(char[] array) |
CharArrayWrapperSequence(char[] buffer,
int offset,
int len) |
| Modifier and Type | Method and Description |
|---|---|
char |
charAt(int index) |
protected CharArrayWrapperSequence |
clone() |
boolean |
equals(Object obj) |
int |
hashCode() |
int |
length() |
CharSequence |
subSequence(int start,
int end) |
String |
toString() |
chars, codePointspublic CharArrayWrapperSequence(char[] array)
public CharArrayWrapperSequence(char[] buffer,
int offset,
int len)
public char charAt(int index)
charAt in interface CharSequencepublic int length()
length in interface CharSequencepublic CharSequence subSequence(int start, int end)
subSequence in interface CharSequenceprotected CharArrayWrapperSequence clone() throws CloneNotSupportedException
clone in class ObjectCloneNotSupportedExceptionpublic String toString()
toString in interface CharSequencetoString in class ObjectCopyright © 2017 The THYMELEAF team. All rights reserved.