net.sf.saxon.value
public class UntypedAtomicValue extends StringValue
Field Summary | |
---|---|
DoubleValue | doubleValue |
static UntypedAtomicValue | ZERO_LENGTH_UNTYPED |
Constructor Summary | |
---|---|
UntypedAtomicValue(CharSequence value)
Constructor |
Method Summary | |
---|---|
int | compareTo(AtomicValue other, StringCollator collator, XPathContext context)
Compare an untypedAtomic value with another value, using a given collator to perform
any string comparisons. |
ConversionResult | convertPrimitive(BuiltInAtomicType requiredType, boolean validate, XPathContext context)
Convert a value to another primitive data type, with control over how validation is
handled. |
AtomicValue | copyAsSubType(AtomicType typeLabel)
Create a copy of this atomic value, with a different type label
|
BuiltInAtomicType | getPrimitiveType()
Determine the primitive type of the value. |
Parameters: value the String value. Null is taken as equivalent to "".
Returns: -1 if the this value is less than the other, 0 if they are equal, +1 if this value is greater.
Throws: ClassCastException if the value cannot be cast to the type of the other operand
Parameters: requiredType type code of the required atomic type. This must not be a namespace-sensitive type. validate true if validation is required. If set to false, the caller guarantees that the value is valid for the target data type, and that further validation is therefore not required. Note that a validation failure may be reported even if validation was not requested. context XPath dynamic context. Used only where the target type is one such as NCName whose definition is context-sensitive
Returns: the result of the conversion, if successful. If unsuccessful, the value returned will be a ValidationErrorValue. The caller must check for this condition. No exception is thrown, instead the exception will be encapsulated within the ErrorValue.
Parameters: typeLabel the type label of the new copy. The caller is responsible for checking that the value actually conforms to this type.