|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.saxon.s9api.XdmValue
public class XdmValue
An value in the XDM data model. A value is a sequence of zero or more items, each item being either an atomic value or a node.
An XdmValue is immutable.
A sequence consisting of a single item may be represented as an instance of XdmItem
,
which is a subtype of XdmValue. However, there is no guarantee that a sequence of length one
will always be an instance of XdmItem.
Similarly, a zero-length sequence may be represented as an instance of XdmEmptySequence
,
but there is no guarantee that every sequence of length zero will always be an instance of
XdmEmptySequence.
Constructor Summary | |
---|---|
protected |
XdmValue()
|
|
XdmValue(Iterable<XdmItem> items)
Create an XdmValue as a sequence of XdmItem objects |
protected |
XdmValue(ValueRepresentation<? extends Item> value)
|
Method Summary | |
---|---|
XdmValue |
append(XdmValue otherValue)
Create a new XdmValue by concatenating the contents of this XdmValue and another XdmValue. |
ValueRepresentation<? extends Item> |
getUnderlyingValue()
Get the underlying implementation object representing the value. |
XdmItem |
itemAt(int n)
Get the n'th item in the value, counting from zero. |
XdmSequenceIterator |
iterator()
Get an iterator over the items in this value. |
protected void |
setValue(ValueRepresentation<? extends Item> value)
|
int |
size()
Get the number of items in the sequence |
protected static XdmValue |
wrap(ValueRepresentation<? extends Item> value)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected XdmValue()
public XdmValue(Iterable<XdmItem> items)
items
- a sequence of XdmItem objects. Note that if this is supplied as a list or similar
collection, subsequent changes to the list/collection will have no effect on the XdmValue.protected XdmValue(ValueRepresentation<? extends Item> value)
Method Detail |
---|
protected void setValue(ValueRepresentation<? extends Item> value)
protected static XdmValue wrap(ValueRepresentation<? extends Item> value)
public XdmValue append(XdmValue otherValue)
otherValue
- the value to be appended
public int size()
SaxonApiUncheckedException
- if the value is lazily evaluated and the delayed
evaluation fails with a dynamic error.public XdmItem itemAt(int n) throws IndexOutOfBoundsException, SaxonApiUncheckedException
n
- the item that is required, counting the first item in the sequence as item zero
IndexOutOfBoundsException
- if n is less than zero or greater than or equal to the number
of items in the value
SaxonApiUncheckedException
- if the value is lazily evaluated and the delayed
evaluation fails with a dynamic error.public XdmSequenceIterator iterator() throws SaxonApiUncheckedException
iterator
in interface Iterable<XdmItem>
SaxonApiUncheckedException
- if the value is lazily evaluated and the delayed
evaluation fails with a dynamic error.public ValueRepresentation<? extends Item> getUnderlyingValue()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |