public class XStringForChars extends XString
Modifier and Type | Field and Description |
---|---|
protected String |
m_strCache |
EMPTYSTRING
CLASS_BOOLEAN, CLASS_NODESET, CLASS_NULL, CLASS_NUMBER, CLASS_RTREEFRAG, CLASS_STRING, CLASS_UNKNOWN, CLASS_UNRESOLVEDVARIABLE, m_obj
Constructor and Description |
---|
XStringForChars(char[] val,
int start,
int length)
Construct a XNodeSet object.
|
Modifier and Type | Method and Description |
---|---|
void |
appendToFsb(FastStringBuffer fsb)
Cast result object to a string.
|
char |
charAt(int index)
Returns the character at the specified index.
|
void |
dispatchAsComment(LexicalHandler lh)
Directly call the
comment method on the passed LexicalHandler for the
string-value.
|
void |
dispatchCharactersEvents(ContentHandler ch)
Directly call the
characters method on the passed ContentHandler for the
string-value.
|
FastStringBuffer |
fsb()
Cast result object to a string.
|
void |
getChars(int srcBegin,
int srcEnd,
char[] dst,
int dstBegin)
Copies characters from this string into the destination character
array.
|
boolean |
hasString()
Tell if this object contains a java String object.
|
int |
length()
Returns the length of this string.
|
Object |
object()
Since this object is incomplete without the length and the offset, we
have to convert to a string when this function is called.
|
String |
str()
Cast result object to a string.
|
bool, callVisitors, compareTo, compareToIgnoreCase, concat, endsWith, equals, equals, equals, equals, equalsIgnoreCase, fixWhiteSpace, getType, getTypeString, hashCode, indexOf, indexOf, indexOf, indexOf, indexOf, lastIndexOf, lastIndexOf, lastIndexOf, lastIndexOf, num, rtf, startsWith, startsWith, startsWith, startsWith, substring, substring, toDouble, toLowerCase, toLowerCase, toUpperCase, toUpperCase, trim, xstr
allowDetachToRelease, boolWithSideEffects, castToType, create, create, deepEquals, destruct, detach, error, error, execute, fixupVariables, getFresh, greaterThan, greaterThanOrEqual, iter, lessThan, lessThanOrEqual, mutableNodeset, nodelist, nodeset, notEquals, numWithSideEffects, reset, rtf, rtree, rtree, setObject, toString
asIterator, asIteratorRaw, asNode, assertion, bool, canTraverseOutsideSubtree, error, execute, execute, execute, executeCharsToContentHandler, exprAddChild, exprGetChild, exprGetNumChildren, exprGetParent, exprSetParent, getColumnNumber, getExpressionOwner, getLineNumber, getPublicId, getSystemId, isNodesetExpr, isSameClass, isStableNumber, num, warn, xstr
protected String m_strCache
public XStringForChars(char[] val, int start, int length)
val
- FastStringBuffer object this will wrap, must be non-null.start
- The start position in the array.length
- The number of characters to read from the array.public FastStringBuffer fsb()
public void appendToFsb(FastStringBuffer fsb)
appendToFsb
in class XObject
public boolean hasString()
public String str()
public Object object()
public void dispatchCharactersEvents(ContentHandler ch) throws SAXException
dispatchCharactersEvents
in interface XMLString
dispatchCharactersEvents
in class XString
ch
- A non-null reference to a ContentHandler.SAXException
public void dispatchAsComment(LexicalHandler lh) throws SAXException
dispatchAsComment
in interface XMLString
dispatchAsComment
in class XString
lh
- A non-null reference to a LexicalHandler.SAXException
public int length()
public char charAt(int index)
0
to length() - 1
. The first character
of the sequence is at index 0
, the next at index
1
, and so on, as for array indexing.charAt
in interface XMLString
charAt
in class XString
index
- the index of the character.0
.IndexOutOfBoundsException
- if the index
argument is negative or not less than the length of this
string.public void getChars(int srcBegin, int srcEnd, char[] dst, int dstBegin)
getChars
in interface XMLString
getChars
in class XString
srcBegin
- index of the first character in the string
to copy.srcEnd
- index after the last character in the string
to copy.dst
- the destination array.dstBegin
- the start offset in the destination array.IndexOutOfBoundsException
- If any of the following
is true:
srcBegin
is negative.
srcBegin
is greater than srcEnd
srcEnd
is greater than the length of this
string
dstBegin
is negative
dstBegin+(srcEnd-srcBegin)
is larger than
dst.length
NullPointerException
- if dst
is null
Copyright © 2016 JBoss by Red Hat. All rights reserved.