org.thymeleaf.util
Class CharArrayWrapperSequence
Object
org.thymeleaf.util.CharArrayWrapperSequence
- All Implemented Interfaces:
- CharSequence
public final class CharArrayWrapperSequence
- extends Object
- implements CharSequence
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.
- Since:
- 2.0.15
- Author:
- Daniel Fernández
CharArrayWrapperSequence
public CharArrayWrapperSequence(char[] array)
CharArrayWrapperSequence
public CharArrayWrapperSequence(char[] buffer,
int offset,
int len)
charAt
public char charAt(int index)
- Specified by:
charAt
in interface CharSequence
length
public int length()
- Specified by:
length
in interface CharSequence
subSequence
public CharSequence subSequence(int start,
int end)
- Specified by:
subSequence
in interface CharSequence
clone
protected CharArrayWrapperSequence clone()
throws CloneNotSupportedException
- Overrides:
clone
in class Object
- Throws:
CloneNotSupportedException
hashCode
public int hashCode()
- Overrides:
hashCode
in class Object
equals
public boolean equals(Object obj)
- Overrides:
equals
in class Object
toString
public String toString()
- Specified by:
toString
in interface CharSequence
- Overrides:
toString
in class Object
Copyright © 2013 The THYMELEAF team. All Rights Reserved.