public class NestedIntegerValue extends AtomicValue implements java.lang.Comparable, AtomicMatchKey
Although the class is implemented as an atomic type derived from xs:string, it has not been integrated into the schema type hierarchy and cannot be used directly in schema validation.
The class provides "smart" ordering, for example 1 < 1.2 < 1.12 < 1.12.6
| Modifier and Type | Field and Description |
|---|---|
static NestedIntegerValue |
ONE |
static NestedIntegerValue |
TWO |
NaN_MATCH_KEY, typeLabel| Constructor and Description |
|---|
NestedIntegerValue(int[] val) |
NestedIntegerValue(java.lang.String v) |
| Modifier and Type | Method and Description |
|---|---|
NestedIntegerValue |
append(int leaf) |
int |
compareTo(java.lang.Object other) |
AtomicValue |
copyAsSubType(AtomicType typeLabel)
Create a copy of this atomic value, with a different type label
|
boolean |
equals(java.lang.Object o)
The equals() methods on atomic values is defined to follow the semantics of eq when applied
to two atomic values.
|
int |
getDepth() |
int |
getLeaf() |
protected java.lang.CharSequence |
getPrimitiveStringValue()
Convert the value to a string, using the serialization rules for the primitive type.
|
BuiltInAtomicType |
getPrimitiveType()
Determine the primitive type of the value.
|
java.lang.Comparable |
getSchemaComparable()
Get a Comparable value that implements the XML Schema ordering comparison semantics for this value.
|
NestedIntegerValue |
getStem() |
AtomicMatchKey |
getXPathComparable(boolean ordered,
StringCollator collator,
int implicitTimezone)
Get an object value that implements the XPath equality and ordering comparison semantics for this value.
|
static NestedIntegerValue |
parse(java.lang.String v) |
asAtomic, asMapKey, atomize, checkPermittedContents, checkValidInJavascript, effectiveBooleanValue, getCanonicalLexicalRepresentation, getCardinality, getComponent, getItemType, getStringValue, getStringValueCS, getUType, head, identityHashCode, isIdentical, isIdentical, isNaN, itemAt, iterate, iterator, process, setTypeLabel, toStringgetLength, isStreamed, reduce, subsequenceclone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitasAtomicgetLengthreduce, subsequencepublic static NestedIntegerValue ONE
public static NestedIntegerValue TWO
public NestedIntegerValue(java.lang.String v)
throws XPathException
XPathExceptionpublic NestedIntegerValue(int[] val)
public static NestedIntegerValue parse(java.lang.String v) throws XPathException
XPathExceptionpublic NestedIntegerValue append(int leaf)
public NestedIntegerValue getStem()
public int getDepth()
public int getLeaf()
public java.lang.Comparable getSchemaComparable()
AtomicValueIn the case of data types that are partially ordered, the returned Comparable extends the standard
semantics of the compareTo() method by returning the value SequenceTool.INDETERMINATE_ORDERING when there
is no defined order relationship between two given values. This value is also returned when two values
of different types are compared.
getSchemaComparable in interface AtomicSequencegetSchemaComparable in class AtomicValuepublic AtomicMatchKey getXPathComparable(boolean ordered, StringCollator collator, int implicitTimezone)
AtomicValuegetXPathComparable in class AtomicValueordered - true if an ordered comparison is required. In this case the result is null if the
type is unordered; in other cases the returned value will be a Comparable.collator - the collation to be used when comparing stringsimplicitTimezone - the implicit timezone in the dynamic context, used when comparing
dates/times with and without timezonepublic boolean equals(java.lang.Object o)
AtomicValueThe hashCode() method is consistent with equals().
equals in class AtomicValueo - the other valuepublic BuiltInAtomicType getPrimitiveType()
AtomicValuegetPrimitiveType in class AtomicValuepublic AtomicValue copyAsSubType(AtomicType typeLabel)
AtomicValuecopyAsSubType in class AtomicValuetypeLabel - the type label of the new copy. The caller is responsible for checking that
the value actually conforms to this type.protected java.lang.CharSequence getPrimitiveStringValue()
AtomicValuegetPrimitiveStringValue in class AtomicValuepublic int compareTo(java.lang.Object other)
compareTo in interface java.lang.ComparableCopyright (c) 2004-2018 Saxonica Limited. All rights reserved.