public final class AppendableCharSequence
extends java.lang.Object
implements java.lang.CharSequence, java.lang.Appendable
构造器和说明 |
---|
AppendableCharSequence(int length) |
限定符和类型 | 方法和说明 |
---|---|
AppendableCharSequence |
append(char c) |
AppendableCharSequence |
append(java.lang.CharSequence csq) |
AppendableCharSequence |
append(java.lang.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) |
java.lang.String |
substring(int start,
int end)
Create a new
String from the given start to end. |
java.lang.String |
subStringUnsafe(int start,
int end)
Create a new
String from the given start to end. |
java.lang.String |
toString() |
public void setLength(int length)
public int length()
length
在接口中 java.lang.CharSequence
public char charAt(int index)
charAt
在接口中 java.lang.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
在接口中 java.lang.CharSequence
public AppendableCharSequence append(char c)
append
在接口中 java.lang.Appendable
public AppendableCharSequence append(java.lang.CharSequence csq)
append
在接口中 java.lang.Appendable
public AppendableCharSequence append(java.lang.CharSequence csq, int start, int end)
append
在接口中 java.lang.Appendable
public void reset()
AppendableCharSequence
. Be aware this will only reset the current internal position and not
shrink the internal char array.public java.lang.String toString()
toString
在接口中 java.lang.CharSequence
toString
在类中 java.lang.Object
public java.lang.String substring(int start, int end)
String
from the given start to end.public java.lang.String subStringUnsafe(int start, int end)
String
from the given start to end.
This method is considered unsafe as index values are assumed to be legitimate.
Only underlying array bounds checking is done.