public class HexBinaryValue extends AtomicValue implements AtomicMatchKey, XPathComparable, ContextFreeAtomicValue
typeLabel
Constructor and Description |
---|
HexBinaryValue(byte[] value)
Constructor: create a hexBinary value from a given array of bytes
|
HexBinaryValue(UnicodeString in)
Constructor: create a hexBinary value from a supplied string, in which
each octet is represented by a pair of values from 0-9, a-f, A-F
|
Modifier and Type | Method and Description |
---|---|
int |
compareTo(XPathComparable o) |
AtomicValue |
copyAsSubType(AtomicType typeLabel)
Create a primitive copy of this atomic value (usually so that the type label can be changed).
|
boolean |
equals(java.lang.Object other)
Test if the two hexBinary or Base64Binaryvalues are equal.
|
byte[] |
getBinaryValue()
Get the binary value
|
int |
getLengthInOctets()
Get the number of octets in the value
|
UnicodeString |
getPrimitiveStringValue()
Convert to string
|
BuiltInAtomicType |
getPrimitiveType()
Determine the primitive type of the value.
|
XPathComparable |
getXPathComparable()
Get an XPathComparable object that supports the semantics of context-free
eq and lt comparisons between atomic values.
|
XPathComparable |
getXPathComparable(StringCollator collator,
int implicitTimezone)
Get an object value that implements the XPath equality and ordering comparison semantics for this value.
|
AtomicMatchKey |
getXPathMatchKey(StringCollator collator,
int implicitTimezone)
Get an object value that implements the XPath equality and ordering comparison semantics for this value.
|
int |
hashCode()
Returns a hash code value for the object.
|
asAtomic, asMapKey, atomize, checkPermittedContents, checkValidInJavascript, effectiveBooleanValue, getCanonicalLexicalRepresentation, getCardinality, getComponent, getGenre, getItemType, getLength, getUnicodeStringValue, getUType, head, identityHashCode, isIdentical, isIdentical, isNaN, isUntypedAtomic, itemAt, iterate, iterator, setTypeLabel, show, toShortString, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
asAtomic
getStringValue, isStreamed, reduce, subsequence
asIterable, concatenate, containsNode, materialize
makeRepeatable
public HexBinaryValue(UnicodeString in) throws XPathException
in
- character representation of the hexBinary valueXPathException
- if the input is invalidpublic HexBinaryValue(byte[] value)
value
- the value as an array of bytespublic AtomicValue copyAsSubType(AtomicType typeLabel)
copyAsSubType
in class AtomicValue
typeLabel
- the target type (a derived type from hexBinary)public BuiltInAtomicType getPrimitiveType()
getPrimitiveType
in class AtomicValue
public byte[] getBinaryValue()
public UnicodeString getPrimitiveStringValue()
getPrimitiveStringValue
in class AtomicValue
public int getLengthInOctets()
public AtomicMatchKey getXPathMatchKey(StringCollator collator, int implicitTimezone)
getXPathMatchKey
in class AtomicValue
collator
- collation to be used for comparing stringsimplicitTimezone
- to be used for comparing dates/times with no timezonepublic XPathComparable getXPathComparable(StringCollator collator, int implicitTimezone)
AtomicValue
getXPathComparable
in class AtomicValue
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 XPathComparable getXPathComparable()
ContextFreeAtomicValue
Comparable
interface, this
cannot be assumed.getXPathComparable
in interface ContextFreeAtomicValue
public boolean equals(java.lang.Object other)
equals
in class AtomicValue
other
- the other valuepublic int hashCode()
AtomicValue
hashCode
in class AtomicValue
public int compareTo(XPathComparable o)
compareTo
in interface java.lang.Comparable<XPathComparable>
Copyright (c) 2004-2022 Saxonica Limited. All rights reserved.