|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.sf.saxon.value.Value
net.sf.saxon.value.AtomicValue
net.sf.saxon.value.StringValue
public class StringValue
A string value
| Nested Class Summary | |
|---|---|
class |
StringValue.CharacterIterator
CharacterIterator is used to iterate over the characters in a string, returning them as integers representing the Unicode code-point. |
| Field Summary | |
|---|---|
static StringValue |
EMPTY_STRING
|
protected int |
length
|
protected CharSequence |
value
|
| Constructor Summary | |
|---|---|
protected |
StringValue()
Protected constructor for use by subtypes |
|
StringValue(CharSequence value)
Constructor. |
| Method Summary | |
|---|---|
int |
conversionPreference(Class required)
Get conversion preference for this value to a Java class. |
AtomicValue |
convert(int requiredType)
Convert to target data type |
Object |
convertToJava(Class target)
Convert to Java object (for passing to external functions) |
void |
display(int level,
NamePool pool)
Diagnostic print of expression structure |
boolean |
effectiveBooleanValue(XPathContext context)
Get the effective boolean value of the value |
boolean |
equals(Object other)
Determine if two StringValues are equal |
static int[] |
expand(CharSequence s)
Expand a string containing surrogate pairs into an array of 32-bit characters |
ItemType |
getItemType()
Return the type of the expression |
int |
getLength()
Get the length of this string, as defined in XPath. |
static int |
getLength(CharSequence s)
Get the length of a string, as defined in XPath. |
String |
getStringValue()
Get the string value as a String |
int |
hashCode()
|
SequenceIterator |
iterateCharacters()
Iterate over a string, returning a sequence of integers representing the Unicode code-point values |
String |
toString()
|
| Methods inherited from class net.sf.saxon.value.AtomicValue |
|---|
convert, convert, evaluateAsString, evaluateItem, getCardinality, getComponent, getPrimitiveValue, getTypedValue, iterate |
| Methods inherited from class net.sf.saxon.value.Value |
|---|
analyze, asItem, asValue, collapseWhitespace, getDependencies, getSpecialProperties, getSubExpressions, inverse, normalizeWhitespace, promote, simplify, stringToInteger, stringToNumber, trimWhitespace |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final StringValue EMPTY_STRING
protected CharSequence value
protected int length
| Constructor Detail |
|---|
protected StringValue()
public StringValue(CharSequence value)
value - the String value. Null is taken as equivalent to "".| Method Detail |
|---|
public final String getStringValue()
public AtomicValue convert(int requiredType)
throws XPathException
convert in class AtomicValuerequiredType - an integer identifying the required atomic type
XPathException - if the conversion is not possiblepublic ItemType getItemType()
public int getLength()
public static int getLength(CharSequence s)
s - The string whose length is requiredpublic SequenceIterator iterateCharacters()
public static int[] expand(CharSequence s)
public boolean equals(Object other)
equals in class Objectpublic int hashCode()
hashCode in class Objectpublic boolean effectiveBooleanValue(XPathContext context)
AtomicValue
effectiveBooleanValue in interface ExpressioneffectiveBooleanValue in class AtomicValuecontext - the evaluation context (not used in this implementation)
public int conversionPreference(Class required)
conversionPreference in class AtomicValue
public Object convertToJava(Class target)
throws XPathException
convertToJava in class AtomicValuetarget - The class required by the external function
XPathException
public void display(int level,
NamePool pool)
level - indentation level for this expressionpublic String toString()
toString in class Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||