public final class AppendableCharSequence extends Object implements CharSequence, Appendable
Constructor and Description |
---|
AppendableCharSequence(int length) |
Modifier and Type | Method and Description |
---|---|
AppendableCharSequence |
append(char c) |
AppendableCharSequence |
append(CharSequence csq) |
AppendableCharSequence |
append(CharSequence csq,
int start,
int end) |
char |
charAt(int index) |
char |
charAtUnsafe(int index)
Access a value in this
CharSequence . |
int |
length() |
void |
reset()
Reset the
AppendableCharSequence . |
void |
setLength(int length) |
AppendableCharSequence |
subSequence(int start,
int end) |
String |
substring(int start,
int end)
Create a new
String from the given start to end. |
String |
subStringUnsafe(int start,
int end)
Create a new
String from the given start to end. |
String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
chars, codePoints
public void setLength(int length)
public int length()
length
in interface CharSequence
public char charAt(int index)
charAt
in interface CharSequence
public char charAtUnsafe(int index)
CharSequence
.
This method is considered unsafe as index values are assumed to be legitimate.
Only underlying array bounds checking is done.index
- The index to access the underlying array at.index
.public AppendableCharSequence subSequence(int start, int end)
subSequence
in interface CharSequence
public AppendableCharSequence append(char c)
append
in interface Appendable
public AppendableCharSequence append(CharSequence csq)
append
in interface Appendable
public AppendableCharSequence append(CharSequence csq, int start, int end)
append
in interface Appendable
public void reset()
AppendableCharSequence
. Be aware this will only reset the current internal position and not
shrink the internal char array.public String toString()
toString
in interface CharSequence
toString
in class Object
public String substring(int start, int end)
String
from the given start to end.Copyright © 2008–2024 The Netty Project. All rights reserved.