|
|||||||||
| Home >> All >> com >> simscomputing >> [ util overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
com.simscomputing.util
Class MutableString

java.lang.Objectcom.simscomputing.util.MutableString
- All Implemented Interfaces:
- java.io.Serializable
- public class MutableString
- extends java.lang.Object
- implements java.io.Serializable
- extends java.lang.Object
Implements a mutable string class. Implements all constructors and methods from the String and StringBuffer classes. Some additional constructors and methods are also implemented. This class is not thread safe.
Note: it has been discovered that the Sun implementation of String and StringBuffer is written such that a StringBuffer can be converted into a String without copying data. Consequently, the String API can be used on a StringBuffer. This revelation may make this MutableString class unnecessary.
- Version:
- $Revision: 1.1.1.1 $ $Date: 2000/02/21 21:22:36 $
| Field Summary | |
(package private) java.util.ArrayList |
stringArray
The mutable string is stored internally as an ArrayList. |
| Constructor Summary | |
MutableString()
Constructs an empty MutableString. |
|
MutableString(byte[] bytes)
Constructs a MutableString that is initialized to 'bytes'. |
|
MutableString(byte[] bytes,
int offset,
int length)
Constructs a MutableString that is initialized to the string 'bytes[offset]..bytes[offset+length-1]'. |
|
MutableString(byte[] bytes,
int offset,
int length,
java.lang.String enc)
Constructs a MutableString that is initialized to the string 'bytes[offset]..bytes[offset+length-1]' using the specified character encoding. |
|
MutableString(byte[] bytes,
java.lang.String enc)
Constructs a MutableString that is initialized to 'bytes' using the specified character encoding. |
|
MutableString(char[] value)
Constructs a MutableString that is initialized to 'value'. |
|
MutableString(char[] value,
int offset,
int count)
Constructs a MutableString that is initialized to the string 'value[offset]..value[offset+count-1]'. |
|
MutableString(int length)
Constructs an empty FastString with capacity equal to 'length'. |
|
MutableString(MutableString string)
Constructs a MutableString that is initialized to 'string'. |
|
MutableString(java.lang.String string)
Constructs a MutableString that is initialized to 'string'. |
|
| Method Summary | |
MutableString |
append(boolean b)
Appends the string representation of 'b' to the object. |
MutableString |
append(char c)
Appends 'c' to the object. |
MutableString |
append(char[] str)
Appends 'str' to the object. |
MutableString |
append(char[] str,
int offset,
int len)
Appends 'str[offset]..str[len-1]' to the object. |
MutableString |
append(double d)
Appends the string representation of 'd' to the object. |
MutableString |
append(float f)
Appends the string representation of 'f' to the object. |
MutableString |
append(int i)
Appends the string representation of 'i' to the object. |
MutableString |
append(long l)
Appends the string representation of 'l' to the object. |
MutableString |
append(MutableString str)
Appends 'str' to the object. |
MutableString |
append(java.lang.Object obj)
Appends the string representation of 'obj' to the object. |
MutableString |
append(java.lang.String str)
Appends 'str' to the object. |
char |
charAt(int index)
Returns string[index]. |
int |
compareTo(MutableString anotherString)
Returns an integer that represents how the MutableString compares to 'anotherString'. |
private int |
compareTo(MutableString anotherString,
boolean matchCase)
Returns an integer that represents how the MutableString compares to 'anotherString'. |
int |
compareTo(java.lang.Object anotherString)
Returns an integer that represents how the MutableString compares to 'anotherString'. |
int |
compareTo(java.lang.String anotherString)
Returns an integer that represents how the MutableString compares to 'anotherString'. |
int |
compareToIgnoreCase(MutableString string)
Returns an integer that represents how the MutableString compares to 'anotherString'. |
int |
compareToIgnoreCase(java.lang.String string)
Returns an integer that represents how the MutableString compares to 'anotherString'. |
MutableString |
concat(MutableString str)
Concatenates 'str' to the MutableString. |
MutableString |
concat(java.lang.String str)
Concatenates 'str' to the MutableString. |
private void |
constructor(byte[] bytes,
int offset,
int length,
java.lang.String enc)
A method used in constructing the object. |
static MutableString |
copyValueOf(char[] data)
Creates a MutableString from the string representation of 'data' |
static MutableString |
copyValueOf(char[] data,
int offset,
int count)
Creates a MutableString from the string representation of 'data[offset..offset + count - 1]'. |
MutableString |
delete(int start,
int end)
Deletes all characters from string[start..end-1]. |
MutableString |
deleteCharAt(int index)
Deletes the character at offset 'index'. |
boolean |
endsWith(MutableString suffix)
Indicates whether the MutableString ends with 'suffix'. |
boolean |
endsWith(java.lang.String suffix)
Indicates whether the string ends with 'suffix'. |
void |
ensureCapacity(int minimumCapacity)
Makes sure the capacity of the object is at least 'minimumCapacity'. |
private boolean |
equals(MutableString anotherString,
boolean matchCase)
Indicates whether 'anotherString' equals this object. |
boolean |
equals(java.lang.Object anObject)
Indicates whether 'anObject' is equivalent to this object. |
boolean |
equals(java.lang.String anObject)
Indicates whether 'anObject' is equivalent to this object. |
boolean |
equalsIgnoreCase(MutableString anotherString)
Indicates whether 'anotherString' equals this object. |
boolean |
equalsIgnoreCase(java.lang.String anotherString)
Indicates whether 'anotherString' equals this object. |
byte[] |
getBytes()
Returns the MutableString in byte[] form. |
byte[] |
getBytes(java.lang.String enc)
Returns the MutableString in byte[] form. |
void |
getChars(int srcBegin,
int srcEnd,
char[] dst,
int dstBegin)
Copies MutableString[srcBegin..srcEnd - 1] into 'dst', beginning at offset 'dstBegin'. |
int |
hashCode()
Computes a hash code on the string. |
int |
indexOf(int ch)
Returns the index, if it exists, of the first occurence of 'ch' in the string. |
int |
indexOf(int ch,
int fromIndex)
Returns the index, if it exists, of the first occurence of 'ch' in the string starting at position 'fromIndex' in the string. |
int |
indexOf(MutableString str)
Returns the index, if it exists, of the first occurence of 'str' in the string. |
int |
indexOf(MutableString str,
int fromIndex)
Returns the index, if it exists, of the first occurence of 'str' in the string beginning at offset 'fromIndex'. |
int |
indexOf(java.lang.String str)
Returns the index, if it exists, of the first occurence of 'str' in the string. |
int |
indexOf(java.lang.String str,
int fromIndex)
Returns the index, if it exists, of the first occurence of 'str' in the string beginning at offset 'fromIndex'. |
private int |
indexOf(java.lang.String str,
int fromIndex,
boolean last)
Returns the index, if it exists, of the first or last occurence of 'str' in the string beginning at offset 'fromIndex'. |
MutableString |
insert(int offset,
boolean b)
Inserts 'true' or 'false' intothe string beginning at index 'offset'. |
MutableString |
insert(int offset,
char c)
Inserts 'c' into the string at index 'offset'. |
MutableString |
insert(int offset,
char[] str)
Inserts 'str[offset..length() - 1]' into the string beginning at position index. |
MutableString |
insert(int index,
char[] str,
int offset,
int len)
Inserts 'str[offset..offset + len]' into the string beginning at position index. |
MutableString |
insert(int offset,
double d)
Inserts the string representation of 'd' into the string beginning at index 'offset'. |
MutableString |
insert(int offset,
float f)
Inserts the string representation of 'f' into the string beginning at index 'offset'. |
MutableString |
insert(int offset,
int i)
Inserts the string representation of 'i' into the string beginning at index 'offset'. |
MutableString |
insert(int offset,
long l)
Inserts the string representation of 'l' into the string beginning at index 'offset'. |
MutableString |
insert(int offset,
MutableString string)
Inserts 'str[offset..offset + len]' into the string beginning at position index. |
MutableString |
insert(int offset,
java.lang.Object obj)
Inserts 'str[offset..offset + len]' into the string beginning at position index. |
MutableString |
insert(int offset,
java.lang.String string)
Inserts 'str[offset..offset + len]' into the string beginning at position index. |
int |
lastIndexOf(int ch)
Returns the index, if it exists, of the last occurence of 'ch' in the string. |
int |
lastIndexOf(int ch,
int fromIndex)
Returns the index, if it exists, of the last occurence of 'ch' in the string starting at position 'fromIndex' in the string. |
int |
lastIndexOf(MutableString str)
Returns the index, if it exists, of the last occurence of 'str' in the string. |
int |
lastIndexOf(MutableString str,
int fromIndex)
Returns the index, if it exists, of the last occurence of 'str' in the string beginning at offset 'fromIndex'. |
int |
lastIndexOf(java.lang.String str)
Returns the index, if it exists, of the last occurence of 'str' in the string. |
int |
lastIndexOf(java.lang.String str,
int fromIndex)
Returns the index, if it exists, of the last occurence of 'str' in the string beginning at offset 'fromIndex'. |
int |
length()
Returns the size of the string. |
boolean |
regionMatches(boolean ignoreCase,
int toffset,
MutableString other,
int ooffset,
int len)
Indicates whether the MutableString[toffset..toffset + len] matches 'other[ooffset..ooffset + len]', ignoring case. |
boolean |
regionMatches(boolean ignoreCase,
int toffset,
java.lang.String other,
int ooffset,
int len)
Indicates whether the MutableString[toffset..toffset + len] matches other[ooffset..ooffset + len], ignoring case. |
boolean |
regionMatches(int toffset,
MutableString other,
int ooffset,
int len)
Indicates whether the MutableString[toffset..toffset + len] matches other[ooffset..ooffset + len], ignoring case. |
boolean |
regionMatches(int toffset,
java.lang.String other,
int ooffset,
int len)
Indicates whether the MutableString[toffset..toffset + len] matches other[ooffset..ooffset + len], ignoring case. |
MutableString |
replace(char oldChar,
char newChar)
Replaces all instances of 'oldChar' with 'newChar'. |
MutableString |
replace(int start,
int end,
MutableString str)
The characters at string[start..end-1] are deleted. |
MutableString |
replace(int start,
int end,
java.lang.String str)
The characters at string[start..end-1] are deleted. |
MutableString |
reverse()
Reverses the MutableString in place. |
void |
setCharAt(int index,
char ch)
Sets the character at offset 'index' to 'ch'. |
void |
setLength(int newLength)
Resets the string to string[0..newLength - 1]. |
boolean |
startsWith(MutableString prefix)
Indicates whether the MutableString begins with 'prefix'. |
boolean |
startsWith(MutableString prefix,
int toffset)
Indicates whether the MutableString begins with 'prefix[toffset..prefix.length() - 1]'. |
boolean |
startsWith(java.lang.String prefix)
Indicates whether the MutableString begins with 'prefix'. |
boolean |
startsWith(java.lang.String prefix,
int toffset)
Indicates whether the MutableString begins with 'prefix[toffset..prefix.length() - 1]'. |
MutableString |
substring(int beginIndex)
Returns string[beginIndex..length() - 1] as a new MutableString. |
MutableString |
substring(int beginIndex,
int endIndex)
Returns string[beginIndex..endIndex - 1] as a new MutableString. |
char[] |
toCharArray()
Converts the MutableString to a character string |
MutableString |
toLowerCase()
Converts all characters in the string to lower case. |
MutableString |
toLowerCase(java.util.Locale locale)
Converts all characters in the string to upper case. |
java.lang.String |
toString()
Converts the MutableString to a String |
MutableString |
toUpperCase()
Converts all characters in the string to upper case. |
MutableString |
toUpperCase(java.util.Locale locale)
Converts all characters in the string to upper case. |
MutableString |
trim()
Removes leading and trailing whitespace. |
static MutableString |
valueOf(boolean b)
Creates a MutableString from the string representation of 'b'. |
static MutableString |
valueOf(char c)
Creates a MutableString from the string representation of 'c'. |
static MutableString |
valueOf(char[] data)
Creates a MutableString from the string representation of 'data'. |
static MutableString |
valueOf(char[] data,
int offset,
int count)
Creates a MutableString from the string representation of 'data[offset..offset + count - 1]'. |
static MutableString |
valueOf(double d)
Creates a MutableString from the string representation of 'd'. |
static MutableString |
valueOf(float f)
Creates a MutableString from the string representation of 'f'. |
static MutableString |
valueOf(int i)
Creates a MutableString from the string representation of 'i'. |
static MutableString |
valueOf(long l)
Creates a MutableString from the string representation of 'l'. |
static MutableString |
valueOf(java.lang.Object obj)
Creates a MutableString from the string representation of 'obj'. |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
stringArray
java.util.ArrayList stringArray
- The mutable string is stored internally as an ArrayList.
| Constructor Detail |
MutableString
public MutableString()
- Constructs an empty MutableString.
MutableString
public MutableString(int length)
- Constructs an empty FastString with capacity equal to 'length'.
MutableString
public MutableString(java.lang.String string)
- Constructs a MutableString that is initialized to 'string'.
MutableString
public MutableString(MutableString string)
- Constructs a MutableString that is initialized to 'string'.
MutableString
public MutableString(char[] value)
- Constructs a MutableString that is initialized to 'value'.
MutableString
public MutableString(char[] value,
int offset,
int count)
- Constructs a MutableString that is initialized to
the string 'value[offset]..value[offset+count-1]'.
MutableString
public MutableString(byte[] bytes,
int offset,
int length,
java.lang.String enc)
throws java.io.UnsupportedEncodingException
- Constructs a MutableString that is initialized to
the string 'bytes[offset]..bytes[offset+length-1]'
using the specified character encoding.
MutableString
public MutableString(byte[] bytes,
java.lang.String enc)
throws java.io.UnsupportedEncodingException
- Constructs a MutableString that is initialized to 'bytes'
using the specified character encoding.
MutableString
public MutableString(byte[] bytes,
int offset,
int length)
- Constructs a MutableString that is initialized to
the string 'bytes[offset]..bytes[offset+length-1]'.
MutableString
public MutableString(byte[] bytes)
- Constructs a MutableString that is initialized to 'bytes'.
| Method Detail |
constructor
private void constructor(byte[] bytes,
int offset,
int length,
java.lang.String enc)
throws java.io.UnsupportedEncodingException
- A method used in constructing the object.
length
public int length()
- Returns the size of the string.
charAt
public char charAt(int index)
- Returns string[index].
getChars
public void getChars(int srcBegin,
int srcEnd,
char[] dst,
int dstBegin)
- Copies MutableString[srcBegin..srcEnd - 1] into 'dst', beginning at offset
'dstBegin'.
getBytes
public byte[] getBytes(java.lang.String enc) throws java.io.UnsupportedEncodingException
- Returns the MutableString in byte[] form.
getBytes
public byte[] getBytes()
- Returns the MutableString in byte[] form.
equals
public boolean equals(java.lang.Object anObject)
- Indicates whether 'anObject' is equivalent to this object. 'anObject' must
be an instance of MutableString.
equals
public boolean equals(java.lang.String anObject)
- Indicates whether 'anObject' is equivalent to this object.
equalsIgnoreCase
public boolean equalsIgnoreCase(MutableString anotherString)
- Indicates whether 'anotherString' equals this object. Case is ignored.
equalsIgnoreCase
public boolean equalsIgnoreCase(java.lang.String anotherString)
- Indicates whether 'anotherString' equals this object. Case is ignored.
equals
private boolean equals(MutableString anotherString, boolean matchCase)
- Indicates whether 'anotherString' equals this object.
compareTo
public int compareTo(MutableString anotherString)
- Returns an integer that represents how the MutableString compares
to 'anotherString'. The comparison result is computed as follows:
If length() != anotherString.length(), result is
length() - anotherString.length().
Otherwise:
If this object exactly matches 'anotherString', result is 0.
Otherwise:
For the first character position where the characters from the two strings
do not match, result is 'string[position] - anotherString[position]'.
compareTo
public int compareTo(java.lang.String anotherString)
- Returns an integer that represents how the MutableString compares
to 'anotherString'. The comparison result is computed as follows:
If length() != anotherString.length(), result is
length() - anotherString.length().
Otherwise:
If this object exactly matches 'anotherString', result is 0.
Otherwise:
For the first character position where the characters from the two strings
do not match, result is 'string[position] - anotherString[position]'.
compareTo
public int compareTo(java.lang.Object anotherString)
- Returns an integer that represents how the MutableString compares
to 'anotherString'. The comparison result is computed as follows:
If 'anotherString' is not a String, result is 0.
Otherwise:
If length() != anotherString.length(), result is
length() - anotherString.length().
Otherwise:
If this object exactly matches 'anotherString', result is 0.
Otherwise:
For the first character position where the characters from the two strings
do not match, result is 'string[position] - anotherString[position]'.
compareToIgnoreCase
public int compareToIgnoreCase(MutableString string)
- Returns an integer that represents how the MutableString compares
to 'anotherString'. Caes is ignored. The comparison result is computed as
follows:
If length() != anotherString.length(), result is
length() - anotherString.length().
Otherwise:
If this object exactly matches 'anotherString', result is 0.
Otherwise:
For the first character position where the characters from the two strings
do not match, result is 'string[position] - anotherString[position]'.
compareToIgnoreCase
public int compareToIgnoreCase(java.lang.String string)
- Returns an integer that represents how the MutableString compares
to 'anotherString'. Case is ignored. The comparison result is computed as
follows:
If length() != anotherString.length(), result is
length() - anotherString.length().
Otherwise:
If this object exactly matches 'anotherString', result is 0.
Otherwise:
For the first character position where the characters from the two strings
do not match, result is 'string[position] - anotherString[position]'.
compareTo
private int compareTo(MutableString anotherString, boolean matchCase)
- Returns an integer that represents how the MutableString compares
to 'anotherString'. The comparison result is computed as follows:
If length() != anotherString.length(), result is
length() - anotherString.length().
Otherwise:
If this object exactly matches 'anotherString', result is 0.
Otherwise:
For the first character position where the characters from the two strings
do not match, result is 'string[position] - anotherString[position]'.
regionMatches
public boolean regionMatches(int toffset,
java.lang.String other,
int ooffset,
int len)
- Indicates whether the MutableString[toffset..toffset + len] matches
other[ooffset..ooffset + len], ignoring case.
regionMatches
public boolean regionMatches(int toffset,
MutableString other,
int ooffset,
int len)
- Indicates whether the MutableString[toffset..toffset + len] matches
other[ooffset..ooffset + len], ignoring case.
regionMatches
public boolean regionMatches(boolean ignoreCase,
int toffset,
java.lang.String other,
int ooffset,
int len)
- Indicates whether the MutableString[toffset..toffset + len] matches
other[ooffset..ooffset + len], ignoring case.
regionMatches
public boolean regionMatches(boolean ignoreCase,
int toffset,
MutableString other,
int ooffset,
int len)
- Indicates whether the MutableString[toffset..toffset + len] matches
'other[ooffset..ooffset + len]', ignoring case.
startsWith
public boolean startsWith(java.lang.String prefix, int toffset)
- Indicates whether the MutableString begins with
'prefix[toffset..prefix.length() - 1]'.
startsWith
public boolean startsWith(MutableString prefix, int toffset)
- Indicates whether the MutableString begins with
'prefix[toffset..prefix.length() - 1]'.
startsWith
public boolean startsWith(java.lang.String prefix)
- Indicates whether the MutableString begins with 'prefix'.
startsWith
public boolean startsWith(MutableString prefix)
- Indicates whether the MutableString begins with 'prefix'.
endsWith
public boolean endsWith(MutableString suffix)
- Indicates whether the MutableString ends with 'suffix'.
endsWith
public boolean endsWith(java.lang.String suffix)
- Indicates whether the string ends with 'suffix'.
hashCode
public int hashCode()
- Computes a hash code on the string.
indexOf
public int indexOf(int ch)
- Returns the index, if it exists, of the first occurence of 'ch' in
the string.
indexOf
public int indexOf(int ch,
int fromIndex)
- Returns the index, if it exists, of the first occurence of 'ch' in
the string starting at position 'fromIndex' in the string.
lastIndexOf
public int lastIndexOf(int ch)
- Returns the index, if it exists, of the last occurence of 'ch' in
the string.
lastIndexOf
public int lastIndexOf(int ch,
int fromIndex)
- Returns the index, if it exists, of the last occurence of 'ch' in
the string starting at position 'fromIndex' in the string.
indexOf
public int indexOf(MutableString str)
- Returns the index, if it exists, of the first occurence of 'str' in
the string.
indexOf
public int indexOf(java.lang.String str)
- Returns the index, if it exists, of the first occurence of 'str' in
the string.
indexOf
public int indexOf(MutableString str, int fromIndex)
- Returns the index, if it exists, of the first occurence of 'str' in
the string beginning at offset 'fromIndex'.
indexOf
public int indexOf(java.lang.String str, int fromIndex)
- Returns the index, if it exists, of the first occurence of 'str' in
the string beginning at offset 'fromIndex'.
lastIndexOf
public int lastIndexOf(MutableString str)
- Returns the index, if it exists, of the last occurence of 'str' in
the string.
lastIndexOf
public int lastIndexOf(java.lang.String str)
- Returns the index, if it exists, of the last occurence of 'str' in
the string.
lastIndexOf
public int lastIndexOf(MutableString str, int fromIndex)
- Returns the index, if it exists, of the last occurence of 'str' in
the string beginning at offset 'fromIndex'.
lastIndexOf
public int lastIndexOf(java.lang.String str, int fromIndex)
- Returns the index, if it exists, of the last occurence of 'str' in
the string beginning at offset 'fromIndex'.
indexOf
private int indexOf(java.lang.String str, int fromIndex, boolean last)
- Returns the index, if it exists, of the first or last occurence of 'str' in
the string beginning at offset 'fromIndex'.
substring
public MutableString substring(int beginIndex)
- Returns string[beginIndex..length() - 1] as a new MutableString.
substring
public MutableString substring(int beginIndex, int endIndex)
- Returns string[beginIndex..endIndex - 1] as a new MutableString.
concat
public MutableString concat(MutableString str)
- Concatenates 'str' to the MutableString.
concat
public MutableString concat(java.lang.String str)
- Concatenates 'str' to the MutableString.
replace
public MutableString replace(char oldChar, char newChar)
- Replaces all instances of 'oldChar' with 'newChar'.
toLowerCase
public MutableString toLowerCase(java.util.Locale locale)
- Converts all characters in the string to upper case.
toLowerCase
public MutableString toLowerCase()
- Converts all characters in the string to lower case.
toUpperCase
public MutableString toUpperCase(java.util.Locale locale)
- Converts all characters in the string to upper case.
toUpperCase
public MutableString toUpperCase()
- Converts all characters in the string to upper case.
trim
public MutableString trim()
- Removes leading and trailing whitespace.
toString
public java.lang.String toString()
- Converts the MutableString to a String
toCharArray
public char[] toCharArray()
- Converts the MutableString to a character string
valueOf
public static MutableString valueOf(java.lang.Object obj)
- Creates a MutableString from the string representation of 'obj'.
valueOf
public static MutableString valueOf(char[] data)
- Creates a MutableString from the string representation of 'data'.
valueOf
public static MutableString valueOf(char[] data, int offset, int count)
- Creates a MutableString from the string representation of
'data[offset..offset + count - 1]'.
copyValueOf
public static MutableString copyValueOf(char[] data, int offset, int count)
- Creates a MutableString from the string representation of
'data[offset..offset + count - 1]'.
copyValueOf
public static MutableString copyValueOf(char[] data)
- Creates a MutableString from the string representation of 'data'
valueOf
public static MutableString valueOf(boolean b)
- Creates a MutableString from the string representation of 'b'.
valueOf
public static MutableString valueOf(char c)
- Creates a MutableString from the string representation of 'c'.
valueOf
public static MutableString valueOf(int i)
- Creates a MutableString from the string representation of 'i'.
valueOf
public static MutableString valueOf(long l)
- Creates a MutableString from the string representation of 'l'.
valueOf
public static MutableString valueOf(float f)
- Creates a MutableString from the string representation of 'f'.
valueOf
public static MutableString valueOf(double d)
- Creates a MutableString from the string representation of 'd'.
ensureCapacity
public void ensureCapacity(int minimumCapacity)
- Makes sure the capacity of the object is at least 'minimumCapacity'.
setLength
public void setLength(int newLength)
- Resets the string to string[0..newLength - 1]. If the old string is
shorter, characters are truncated. If the old string is longer, null
characters are inserted.
setCharAt
public void setCharAt(int index,
char ch)
- Sets the character at offset 'index' to 'ch'.
append
public MutableString append(java.lang.Object obj)
- Appends the string representation of 'obj' to the object.
append
public MutableString append(MutableString str)
- Appends 'str' to the object.
append
public MutableString append(java.lang.String str)
- Appends 'str' to the object.
append
public MutableString append(char[] str)
- Appends 'str' to the object.
append
public MutableString append(char[] str, int offset, int len)
- Appends 'str[offset]..str[len-1]' to the object.
append
public MutableString append(boolean b)
- Appends the string representation of 'b' to the object.
append
public MutableString append(char c)
- Appends 'c' to the object.
append
public MutableString append(int i)
- Appends the string representation of 'i' to the object.
append
public MutableString append(long l)
- Appends the string representation of 'l' to the object.
append
public MutableString append(float f)
- Appends the string representation of 'f' to the object.
append
public MutableString append(double d)
- Appends the string representation of 'd' to the object.
delete
public MutableString delete(int start, int end)
- Deletes all characters from string[start..end-1].
deleteCharAt
public MutableString deleteCharAt(int index)
- Deletes the character at offset 'index'.
replace
public MutableString replace(int start, int end, MutableString str)
- The characters at string[start..end-1] are deleted. Then 'str' is
inserted into the string starting at the 'start' position.
replace
public MutableString replace(int start, int end, java.lang.String str)
- The characters at string[start..end-1] are deleted. Then 'str' is
inserted into the string starting at the 'start' position.
insert
public MutableString insert(int index, char[] str, int offset, int len)
- Inserts 'str[offset..offset + len]' into the string beginning at position
index.
insert
public MutableString insert(int offset, java.lang.Object obj)
- Inserts 'str[offset..offset + len]' into the string beginning at position
index.
insert
public MutableString insert(int offset, MutableString string)
- Inserts 'str[offset..offset + len]' into the string beginning at position
index.
insert
public MutableString insert(int offset, java.lang.String string)
- Inserts 'str[offset..offset + len]' into the string beginning at position
index.
insert
public MutableString insert(int offset, char[] str)
- Inserts 'str[offset..length() - 1]' into the string beginning at position
index.
insert
public MutableString insert(int offset, boolean b)
- Inserts 'true' or 'false' intothe string beginning at index 'offset'.
insert
public MutableString insert(int offset, char c)
- Inserts 'c' into the string at index 'offset'.
insert
public MutableString insert(int offset, int i)
- Inserts the string representation of 'i' into the string beginning at index
'offset'.
insert
public MutableString insert(int offset, long l)
- Inserts the string representation of 'l' into the string beginning at index
'offset'.
insert
public MutableString insert(int offset, float f)
- Inserts the string representation of 'f' into the string beginning at index
'offset'.
insert
public MutableString insert(int offset, double d)
- Inserts the string representation of 'd' into the string beginning at index
'offset'.
reverse
public MutableString reverse()
- Reverses the MutableString in place.
|
|||||||||
| Home >> All >> com >> simscomputing >> [ util overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC
com.simscomputing.util.MutableString