Package org.basex.query.value.seq.tree
Class TreeSeq
java.lang.Object
org.basex.query.expr.ExprInfo
org.basex.query.expr.Expr
org.basex.query.value.Value
org.basex.query.value.seq.Seq
org.basex.query.value.seq.tree.TreeSeq
A tree storing
Items.- Author:
- BaseX Team 2005-21, BSD License, Leo Woerteler
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionfinal longatomSize()Computes the number of atomized items.final ValueatomValue(QueryContext qc, InputInfo ii) Evaluates the expression and returns the atomized items.final voidCaches lazy values.abstract TreeSeqConcatenates this sequence with another one.protected final ValuecopyInsert(long pos, Value value, QueryContext qc) Helper forSeq.insertBefore(long, Value, QueryContext)that copies all items into aTreeSeq.final Itemebv(QueryContext qc, InputInfo ii) Checks if the effective boolean value can be computed for this expression:iter()Returns an iterator.iterator()abstract ListIterator<Item>iterator(long start) Iterator over the members of this sequence.Methods inherited from class org.basex.query.value.seq.Seq
ddo, description, equals, get, hash, initialCapacity, insert, insertBefore, item, plan, plan, refineType, remove, seqType, size, subSeq, subsequence, test, toErrorString, toJavaMethods inherited from class org.basex.query.value.Value
accept, checkUp, compile, copy, count, exprSize, has, inline, inlineable, isEmpty, isItem, itemAt, iter, materialize, reverse, serialize, serialize, serialize, valueMethods inherited from class org.basex.query.expr.Expr
arg, args, atomItem, atomIter, data, data, funcType, hasFreeVars, indexAccessible, isSimple, markTailCalls, mergeEbv, optimize, simplifyFor, typeCheck, uses, vacuous, visitAllMethods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Method Details
-
copyInsert
Description copied from class:SeqHelper forSeq.insertBefore(long, Value, QueryContext)that copies all items into aTreeSeq.- Overrides:
copyInsertin classSeq- Parameters:
pos- position at which the value should be inserted, must be between 0 andSeq.sizevalue- value to insertqc- query context- Returns:
- resulting value
-
concat
Concatenates this sequence with another one. Running time: O(log (min { this.size(), other.size() }))- Parameters:
other- array to append to the end of this array- Returns:
- resulting array
-
iterator
Iterator over the members of this sequence.- Parameters:
start- starting position (i.e. the position initially returned byListIterator.nextIndex())- Returns:
- array over the array members
-
iterator
-
iter
Description copied from class:ValueReturns an iterator. -
cache
Description copied from class:ValueCaches lazy values.- Specified by:
cachein classValue- Parameters:
lazy- lazy cachingii- input info- Throws:
QueryException- query exception
-
atomValue
Description copied from class:ExprEvaluates the expression and returns the atomized items.- Specified by:
atomValuein classExpr- Parameters:
qc- query contextii- input info (only required bySeqinstances, which have no input info)- Returns:
- atomized item
- Throws:
QueryException- query exception
-
atomSize
public final long atomSize()Description copied from class:ValueComputes the number of atomized items. -
ebv
Description copied from class:ExprChecks if the effective boolean value can be computed for this expression:
- If it yields an empty sequence,
Bln.FALSEwill be returned. - If it yields a single item, this item will be returned.
- If it yields nodes, the first node will be returned.
- Otherwise, an error will be raised.
A single numeric item may later be evaluated as positional predicate.
- Specified by:
ebvin classExpr- Parameters:
qc- query contextii- input info (required forSeqinstances, which have no input info)- Returns:
- item
- Throws:
QueryException- query exception
- If it yields an empty sequence,
-