public final class CharArrayWrapperSequence extends Object implements CharSequence, Cloneable
Wrapper class that allows the use of char[] objects as CharSequence
s,
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, codePoints
public CharArrayWrapperSequence(char[] array)
public CharArrayWrapperSequence(char[] buffer, int offset, int len)
public char charAt(int index)
charAt
in interface CharSequence
public int length()
length
in interface CharSequence
public CharSequence subSequence(int start, int end)
subSequence
in interface CharSequence
protected CharArrayWrapperSequence clone() throws CloneNotSupportedException
clone
in class Object
CloneNotSupportedException
public String toString()
toString
in interface CharSequence
toString
in class Object
Copyright © 2016 The THYMELEAF team. All rights reserved.