|
J avolution v3.7 (J2SE 1.5+) | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjavolution.realtime.RealtimeObject
javolution.xml.CharacterData
public final class CharacterData
This class represents a text that is not markup and constitutes the "Character Data" of a XML document.
During deserialization, instances of this class are generated for character data containing at least one non-whitespace character.
During serialization, instances of this class are written in a
"CDATA" section ().<![CDATA[...]]>
Note: During deserialization, instances of this class are wrappers around the parser characters buffer; therefore immutability is not guarantee.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class javolution.realtime.RealtimeObject |
|---|
RealtimeObject.Factory<T extends RealtimeObject> |
| Nested classes/interfaces inherited from interface javolution.realtime.Realtime |
|---|
Realtime.ObjectSpace |
| Method Summary | |
|---|---|
char |
charAt(int index)
Returns the character at the specified index. |
char[] |
chars()
Returns the characters source of this character data. |
boolean |
equals(java.lang.Object obj)
Compares this character data against the specified object for equality. |
int |
hashCode()
Returns the hash code for this character data. |
int |
length()
Returns the length of this character data. |
int |
offset()
Returns the index of the first character in this character data. |
java.lang.CharSequence |
subSequence(int start,
int end)
Returns a subsequence of this character data. |
Text |
toText()
Returns the default textual representation of this realtime object. |
static CharacterData |
valueOf(char[] chars,
int offset,
int length)
Returns the character that contains the characters from the specified subarray of characters. |
static CharacterData |
valueOf(java.lang.CharSequence csq)
Returns the character data for the specified character sequence (convenience method). |
| Methods inherited from class javolution.realtime.RealtimeObject |
|---|
export, move, moveHeap, preserve, recycle, toString, unpreserve |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface java.lang.CharSequence |
|---|
toString |
| Method Detail |
|---|
public static CharacterData valueOf(char[] chars,
int offset,
int length)
chars - the source of the characters.offset - the index of the first character in the data soure.length - the length of the text returned.
java.lang.IndexOutOfBoundsException - if (offset < 0) ||
(length < 0) || ((offset + length) > chars.length)public static CharacterData valueOf(java.lang.CharSequence csq)
csq - the character sequence being wrapped.
public char[] chars()
public int offset()
public int length()
length in interface java.lang.CharSequencepublic char charAt(int index)
charAt in interface java.lang.CharSequenceindex - the index of the character.
java.lang.IndexOutOfBoundsException - if index is negative, or index
is equal or greater than this.length().
public java.lang.CharSequence subSequence(int start,
int end)
subSequence in interface java.lang.CharSequencestart - the index of the first character inclusive.end - the index of the last character exclusive.
java.lang.IndexOutOfBoundsException - if (start < 0) || (end < 0) ||
(start > end) || (end > this.length())public final boolean equals(java.lang.Object obj)
true if the specified object are both character
data having the same character content.
equals in class java.lang.Objectobj - the object to compare with or null.
true if that is a character data with the same
character content as this one; false otherwise.public final int hashCode()
hashCode in class java.lang.Objectpublic Text toText()
RealtimeObject
toText in interface RealtimetoText in class RealtimeObject
|
J avolution v3.7 (J2SE 1.5+) | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||