public final class FndAutoString
extends java.lang.Object
implements java.lang.Cloneable
Constructor and Description |
---|
FndAutoString()
Construct a new AutoString allocating a buffer of the default size.
|
FndAutoString(int initialSize)
Construct a new AutoString allocating a buffer of the specified size.
|
Modifier and Type | Method and Description |
---|---|
FndAutoString |
append(char ch)
Append one character to this string buffer.
|
FndAutoString |
append(char[] cbuf,
int off,
int len)
Append a portion of an array of characters to this string buffer.
|
FndAutoString |
append(FndAutoString buf)
Append to this buffer the contents of another AutoString
|
FndAutoString |
append(java.lang.String str)
Append a string to this string buffer.
|
FndAutoString |
append(java.lang.String str1,
java.lang.String str2)
Append a sequence of two strings to this string buffer.
|
FndAutoString |
append(java.lang.String str1,
java.lang.String str2,
java.lang.String str3)
Append a sequence of three strings to this string buffer.
|
FndAutoString |
append(java.lang.String str1,
java.lang.String str2,
java.lang.String str3,
java.lang.String str4)
Append a sequence of four strings to this string buffer.
|
FndAutoString |
append(java.lang.String str1,
java.lang.String str2,
java.lang.String str3,
java.lang.String str4,
java.lang.String str5)
Append a sequence of five strings to this string buffer.
|
FndAutoString |
append(java.lang.String str1,
java.lang.String str2,
java.lang.String str3,
java.lang.String str4,
java.lang.String str5,
java.lang.String str6)
Append a sequence of six strings to this string buffer.
|
FndAutoString |
appendBoolean(boolean b)
Append to this buffer the string representation of boolean
|
FndAutoString |
appendInt(int i)
Append to this buffer the string representation of an integer
|
void |
clear()
Clear the characters from the buffer but keep the allocated space
|
java.lang.Object |
clone()
Clones this AutoString.
|
boolean |
endsWith(java.lang.String suffix)
Tests if this string buffer ends with the specified suffix.
|
boolean |
equals(java.lang.Object obj)
Return true if a specified Object is an AutoString and has exactly the same
contents as this AutoString
|
int |
hashCode()
Return a hashcode for this AutoString
|
int |
length()
Return the length (character count) of this string buffer.
|
void |
setLength(int newLength)
Sets the length of this string buffer to a value lower than the current length of the buffer.
|
java.lang.String |
toString()
Convert to a string representing the data in this string buffer
|
public FndAutoString(int initialSize)
public FndAutoString()
public FndAutoString append(java.lang.String str)
public FndAutoString append(java.lang.String str1, java.lang.String str2)
public FndAutoString append(java.lang.String str1, java.lang.String str2, java.lang.String str3)
public FndAutoString append(java.lang.String str1, java.lang.String str2, java.lang.String str3, java.lang.String str4)
public FndAutoString append(java.lang.String str1, java.lang.String str2, java.lang.String str3, java.lang.String str4, java.lang.String str5)
public FndAutoString append(java.lang.String str1, java.lang.String str2, java.lang.String str3, java.lang.String str4, java.lang.String str5, java.lang.String str6)
public FndAutoString append(char[] cbuf, int off, int len)
public FndAutoString append(FndAutoString buf)
public FndAutoString append(char ch)
public FndAutoString appendInt(int i)
public FndAutoString appendBoolean(boolean b)
public void clear()
public int length()
public java.lang.String toString()
toString
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public java.lang.Object clone()
clone
in class java.lang.Object
public void setLength(int newLength)
newLength
- the new lengthjava.lang.IndexOutOfBoundsException
- if the specified length is negative or is greater than the current length of the buffer.public boolean endsWith(java.lang.String suffix)
suffix
- the suffix.true
if the character sequence represented by the
argument is a suffix of the character sequence represented by
this buffer, false
otherwise. Note that the
result will be true
if the argument is the empty string.