public class UntypedAtomicValue extends StringValue
StringValue.CharacterIterator, StringValue.UnicodeCharacterIterator
Modifier and Type | Field and Description |
---|---|
static UntypedAtomicValue |
ZERO_LENGTH_UNTYPED |
EMPTY_STRING, FALSE, SINGLE_SPACE, TRUE, value
typeLabel
Constructor and Description |
---|
UntypedAtomicValue(java.lang.CharSequence value)
Constructor
|
Modifier and Type | Method and Description |
---|---|
int |
compareTo(AtomicValue other,
StringCollator collator,
XPathContext context)
Compare an untypedAtomic value with another value, using a given collator to perform
any string comparisons.
|
AtomicValue |
copyAsSubType(AtomicType typeLabel)
Create a copy of this atomic value, with a different type label
|
ConversionResult |
getConversionResultIfKnown(int atomicType)
Ask whether there is a known match key for comparing this value as
a particular type.
|
BuiltInAtomicType |
getPrimitiveType()
Determine the primitive type of the value.
|
ConversionResult |
obtainConversionResult(int atomicType,
StringConverter converter)
Compute and cache a conversion result converting this value to a particular type
|
void |
setConversionResult(int atomicType,
AtomicValue value)
Cache the result of a conversion
|
java.lang.String |
toShortString()
For displaying the value in error messages, prefix with "u" to highlight that it's
untyped atomic
|
codepointEquals, containsSurrogatePairs, contract, diagnosticDisplay, effectiveBooleanValue, equals, expand, getPrimitiveStringValue, getSchemaComparable, getStringLength, getStringLength, getStringLengthUpperBound, getUnicodeString, getXPathComparable, hashCode, isEmpty, isIdentical, isKnownToContainNoSurrogates, isZeroLength, iterateCharacters, makeStringValue, setContainsNoSurrogates, setStringValueCS, toString
asAtomic, asMapKey, atomize, checkPermittedContents, checkValidInJavascript, getCanonicalLexicalRepresentation, getCardinality, getComponent, getGenre, getItemType, getLength, getStringValue, getStringValueCS, getUType, head, identityHashCode, isIdentical, isNaN, itemAt, iterate, iterator, process, setTypeLabel
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
isStreamed, reduce, subsequence, toGroundedValue
asIterable, materialize
makeRepeatable
public static final UntypedAtomicValue ZERO_LENGTH_UNTYPED
public UntypedAtomicValue(java.lang.CharSequence value)
value
- the String value. Null is taken as equivalent to "".public AtomicValue copyAsSubType(AtomicType typeLabel)
copyAsSubType
in class StringValue
typeLabel
- the type label of the new copy. The caller is responsible for checking that
the value actually conforms to this type.public BuiltInAtomicType getPrimitiveType()
getPrimitiveType
in class StringValue
public int compareTo(AtomicValue other, StringCollator collator, XPathContext context)
other
- the value to compare this value withcollator
- the collation to be used for comparing stringscontext
- the XPath dynamic contextjava.lang.ClassCastException
- if the value cannot be cast to the type of the other operandpublic ConversionResult getConversionResultIfKnown(int atomicType)
public ConversionResult obtainConversionResult(int atomicType, StringConverter converter)
This method should not be used if the converter is namespace-sensitive, since the cached value may then be incorrect.
atomicType
- the fingerprint of the type to which the value is being converteredconverter
- the converter used to convert to the target typepublic void setConversionResult(int atomicType, AtomicValue value)
public java.lang.String toShortString()
toShortString
in interface GroundedValue<AtomicValue>
toShortString
in interface Item<AtomicValue>
toShortString
in class StringValue
Copyright (c) 2004-2020 Saxonica Limited. All rights reserved.