public class NestedIntegerValue extends AtomicValue implements 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(String v) |
Modifier and Type | Method and Description |
---|---|
NestedIntegerValue |
append(int leaf) |
int |
compareTo(Object other) |
AtomicValue |
copyAsSubType(AtomicType typeLabel)
Create a copy of this atomic value, with a different type label
|
boolean |
equals(Object o)
The equals() methods on atomic values is defined to follow the semantics of eq when applied
to two atomic values.
|
int |
getLeaf() |
protected 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.
|
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(String v) |
asAtomic, asMapKey, atomize, checkPermittedContents, effectiveBooleanValue, getCanonicalLexicalRepresentation, getCardinality, getComponent, getItemType, getStringValue, getStringValueCS, getUType, head, identityHashCode, isIdentical, isIdentical, isNaN, itemAt, iterate, iterator, process, setTypeLabel, toString
getLength, reduce, subsequence
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
asAtomic
getLength
reduce, subsequence
public static NestedIntegerValue ONE
public static NestedIntegerValue TWO
public NestedIntegerValue(String v) throws XPathException
XPathException
public NestedIntegerValue(int[] val)
public static NestedIntegerValue parse(String v) throws XPathException
XPathException
public NestedIntegerValue append(int leaf)
public NestedIntegerValue getStem()
public int getLeaf()
public Comparable getSchemaComparable()
AtomicValue
In 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 AtomicSequence
getSchemaComparable
in class AtomicValue
public AtomicMatchKey getXPathComparable(boolean ordered, StringCollator collator, int implicitTimezone)
AtomicValue
getXPathComparable
in class AtomicValue
ordered
- 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(Object o)
AtomicValue
The hashCode() method is consistent with equals().
equals
in class AtomicValue
o
- the other valuepublic BuiltInAtomicType getPrimitiveType()
AtomicValue
getPrimitiveType
in class AtomicValue
public AtomicValue copyAsSubType(AtomicType typeLabel)
AtomicValue
copyAsSubType
in class AtomicValue
typeLabel
- the type label of the new copy. The caller is responsible for checking that
the value actually conforms to this type.protected CharSequence getPrimitiveStringValue()
AtomicValue
getPrimitiveStringValue
in class AtomicValue
public int compareTo(Object other)
compareTo
in interface Comparable
Copyright (c) 2004-2014 Saxonica Limited. All rights reserved.