public final class ShareableSequence extends Value
INDETERMINATE_ORDERING
EMPTY_VALUE_ARRAY
Constructor and Description |
---|
ShareableSequence(java.util.List list)
Construct an sequence from an array of items.
|
Modifier and Type | Method and Description |
---|---|
boolean |
effectiveBooleanValue()
Get the effective boolean value
|
int |
getCardinality()
Determine the cardinality
|
ItemType |
getItemType(TypeHierarchy th)
Get the (lowest common) item type
|
int |
getLength()
Get the number of items in the sequence
|
java.util.List |
getList()
Get the underlying list
|
boolean |
isShareable()
Determine whether another value can share this list.
|
Item |
itemAt(int n)
Get the n'th item in the sequence (starting with 0 as the first item)
|
SequenceIterator |
iterate()
Return an iterator over this sequence.
|
static ShareableSequence |
makeShareableSequence(Value baseVal,
SequenceIterator iter)
Make a new ShareableSequence from an existing value and an iterator over items to be appended to
the sequence
|
Value |
reduce()
Reduce a value to its simplest form.
|
Value |
simplify()
Simplify this value
|
java.lang.String |
toString() |
asItem, asItem, asIterator, asValue, checkPermittedContents, convertToJava, equals, fromItem, getCanonicalLexicalRepresentation, getIterator, getSchemaComparable, getSequenceLength, getStringValue, getStringValueCS, hashCode, isIdentical, process
public ShareableSequence(java.util.List list)
list
- the list of items to be included in the sequencepublic static ShareableSequence makeShareableSequence(Value baseVal, SequenceIterator iter) throws XPathException
baseVal
- the base value (which may or may not be a ShareableSequence)iter
- the items to be addedXPathException
public boolean isShareable()
public java.util.List getList()
public Value simplify()
public Value reduce()
public int getLength()
public int getCardinality()
getCardinality
in class Value
Cardinality
public ItemType getItemType(TypeHierarchy th)
getItemType
in class Value
th
- the type hierarchy cache. If null is supplied, the resulting value may be less precisepublic Item itemAt(int n)
public SequenceIterator iterate()
public boolean effectiveBooleanValue() throws XPathException
effectiveBooleanValue
in class Value
XPathException
- if any dynamic error occurs evaluating the
expressionpublic java.lang.String toString()
toString
in class java.lang.Object