|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.norther.tammi.acorn.lang.XMLString
public class XMLString
A string representation of XML text encoding all string input except tags with specific methods.
Note that character level modifications may break the encoding.
Field Summary | |
---|---|
static String |
BR
The XHTML line break tag. |
static String |
NBSP
The XHTML space reference. |
Constructor Summary | |
---|---|
XMLString()
Constructs a new string. |
|
XMLString(CharSequence seq)
Constructs a new string for the specified char sequence. |
|
XMLString(CharSequence seq,
String delim)
Constructs a new string for the specified char sequence with a line delimiter. |
|
XMLString(int capacity)
Constructs a new string of the specified capacity. |
|
XMLString(int capacity,
String delim)
Constructs a new string of the specified capacity and line delimiter. |
|
XMLString(String delim)
Constructs a new string with a line delimiter. |
Method Summary | |
---|---|
XMLString |
append(boolean b)
Appends a boolean argument. |
XMLString |
append(char c)
Appends a char argument. |
XMLString |
append(char[] chars)
Appends a char array argument. |
XMLString |
append(char[] chars,
int index,
int len)
Appends a char array argument. |
XMLString |
append(CharSequence s)
Appends a char sequence argument. |
XMLString |
append(CharSequence s,
int start,
int end)
Appends a char sequence argument. |
XMLString |
append(double d)
Appends a double argument. |
XMLString |
append(float f)
Appends a float argument. |
XMLString |
append(int i)
Appends an int argument. |
XMLString |
append(long l)
Appends a long argument. |
XMLString |
append(Object obj)
Appends an object argument. |
XMLString |
append(String str)
Appends a string argument. |
XMLString |
append(StringBuffer sb)
Appends a string buffer argument. |
XMLString |
appendTag(CharSequence tag)
Appends a tag argument without encoding. |
int |
capacity()
Returns the capacity. |
char |
charAt(int index)
|
XMLString |
delete(int start,
int end)
Deletes a sequense. |
XMLString |
deleteCharAt(int index)
Deletes a character. |
void |
ensureCapacity(int minimumCapacity)
Ensures a capacity. |
boolean |
equals(Object other)
|
void |
getChars(int srcBegin,
int srcEnd,
char[] dst,
int dstBegin)
Gets characters. |
String |
getLineDelimiter()
Gets the line delimiter to apply. |
int |
hashCode()
|
int |
indexOf(String str)
Returns the index of the specified substring. |
int |
indexOf(String str,
int fromIndex)
Returns the index of the specified substring. |
XMLString |
insert(int offset,
boolean b)
Inserts a boolean argument. |
XMLString |
insert(int offset,
char c)
Inserts a char argument. |
XMLString |
insert(int offset,
char[] chars)
Inserts a char array argument. |
XMLString |
insert(int offset,
char[] chars,
int index,
int len)
Inserts a char array argument. |
XMLString |
insert(int offset,
CharSequence s)
Inserts a char sequence argument. |
XMLString |
insert(int offset,
CharSequence s,
int start,
int end)
Inserts a char sequence argument. |
XMLString |
insert(int offset,
double d)
Inserts a double argument. |
XMLString |
insert(int offset,
float f)
Inserts a float argument. |
XMLString |
insert(int offset,
int i)
Inserts an int argument. |
XMLString |
insert(int offset,
long l)
Inserts a long argument. |
XMLString |
insert(int offset,
Object obj)
Inserts an object argument. |
XMLString |
insert(int offset,
String str)
Inserts a string argument. |
XMLString |
insertTag(int offset,
CharSequence tag)
Inserts a tag argument without encoding. |
int |
lastIndexOf(String str)
Returns the last index of the specified substring. |
int |
lastIndexOf(String str,
int fromIndex)
Returns the last index of the specified substring. |
int |
length()
|
XMLString |
replace(int start,
int end,
String str)
Replaces a string argument. |
XMLString |
replaceTag(int start,
int end,
CharSequence tag)
Replaces a tag argument without encoding. |
void |
setCharAt(int index,
char c)
Sets the indexed character. |
void |
setLength(int newLength)
Sets the length. |
CharSequence |
subSequence(int start,
int end)
|
String |
substring(int start)
Returns a substring. |
String |
substring(int start,
int end)
Returns a substring. |
String |
toString()
|
void |
trimToSize()
Trims this string to its size. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final String NBSP
public static final String BR
Constructor Detail |
---|
public XMLString()
public XMLString(String delim)
delim
- the line delimiter.public XMLString(int capacity)
capacity
- the initial capacity.
NegativeArraySizeException
- if capaciy < 0.public XMLString(int capacity, String delim)
capacity
- the initial capacity.delim
- the line delimiter.
NegativeArraySizeException
- if capacity < 0.public XMLString(CharSequence seq)
seq
- the sequence to copy.
NullPointerException
- if seq is null.public XMLString(CharSequence seq, String delim)
seq
- the sequence to copy.delim
- the line delimiter.
NullPointerException
- if seq is null.Method Detail |
---|
public boolean equals(Object other)
equals
in class Object
public int hashCode()
hashCode
in class Object
public int length()
length
in interface CharSequence
public char charAt(int index)
charAt
in interface CharSequence
public CharSequence subSequence(int start, int end)
subSequence
in interface CharSequence
public String toString()
toString
in interface CharSequence
toString
in class Object
public String getLineDelimiter()
public XMLString append(boolean b)
b
- the argument.
public XMLString append(char c)
c
- the argument.
public XMLString append(char[] chars, int index, int len)
chars
- the argument.index
- the index.len
- the length.
public XMLString append(char[] chars)
chars
- the argument.
public XMLString append(CharSequence s, int start, int end)
s
- the argument.start
- the start.end
- the end.
public XMLString append(CharSequence s)
s
- the argument.
public XMLString append(double d)
d
- the argument.
public XMLString append(float f)
f
- the argument.
public XMLString append(int i)
i
- the argument.
public XMLString append(long l)
l
- the argument.
public XMLString append(Object obj)
obj
- the argument.
public XMLString append(String str)
str
- the argument.
public XMLString append(StringBuffer sb)
sb
- the argument.
public XMLString appendTag(CharSequence tag)
tag
- the argument.
public int capacity()
public XMLString delete(int start, int end)
start
- the start.end
- the end.
public XMLString deleteCharAt(int index)
index
- the index.
public void ensureCapacity(int minimumCapacity)
minimumCapacity
- the minimum capacity.public void getChars(int srcBegin, int srcEnd, char[] dst, int dstBegin)
srcBegin
- the begin index.srcEnd
- the en index.dst
- the destination.dstBegin
- the destination index.public int indexOf(String str, int fromIndex)
str
- the substring.fromIndex
- the start index.
public int indexOf(String str)
str
- the substring.
public XMLString insert(int offset, boolean b)
offset
- the offset.b
- the argument.
public XMLString insert(int offset, char c)
offset
- the offset.c
- the argument.
public XMLString insert(int offset, char[] chars, int index, int len)
offset
- the offset.chars
- the argument.index
- the index.len
- the length.
public XMLString insert(int offset, char[] chars)
offset
- the offset.chars
- the argument.
public XMLString insert(int offset, CharSequence s, int start, int end)
offset
- the offset.s
- the argument.start
- the start.end
- the end.
public XMLString insert(int offset, CharSequence s)
offset
- the offset.s
- the argument.
public XMLString insert(int offset, double d)
offset
- the offset.d
- the argument.
public XMLString insert(int offset, float f)
offset
- the offset.f
- the argument.
public XMLString insert(int offset, int i)
offset
- the offset.i
- the argument.
public XMLString insert(int offset, long l)
offset
- the offset.l
- the argument.
public XMLString insert(int offset, Object obj)
offset
- the offset.obj
- the argument.
public XMLString insert(int offset, String str)
offset
- the offset.str
- the argument.
public XMLString insertTag(int offset, CharSequence tag)
offset
- the offset.tag
- the argument.
public int lastIndexOf(String str, int fromIndex)
str
- the substring.fromIndex
- the start index.
public int lastIndexOf(String str)
str
- the substring.
public XMLString replace(int start, int end, String str)
start
- the start.end
- the end.str
- the argument.
public XMLString replaceTag(int start, int end, CharSequence tag)
start
- the start.end
- the end.tag
- the argument.
public void setCharAt(int index, char c)
index
- the index.c
- the character.public void setLength(int newLength)
newLength
- the length.public String substring(int start, int end)
start
- the start.end
- the end.
public String substring(int start)
start
- the start.
public void trimToSize()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |