Package org.basex.query.value.seq
Class SubSeq
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.SubSeq
A sequence that defines a sub-range of another sequence.
- Author:
- BaseX Team 2005-21, BSD License, Leo Woerteler
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionlongatomSize()Computes the number of atomized items.atomValue(QueryContext qc, InputInfo ii) Evaluates the expression and returns the atomized items.voidCaches lazy values.ebv(QueryContext qc, InputInfo ii) Checks if the effective boolean value can be computed for this expression:insert(long pos, Item item, QueryContext qc) Inserts an item at the given position into this sequence and returns the resulting sequence.itemAt(long pos) Returns the item at the given position in the value.remove(long pos, QueryContext qc) Removes the item at the given position in this sequence and returns the resulting sequence.reverse(QueryContext qc) Returns all items of this value in reverse order.protected SeqsubSeq(long offset, long length, QueryContext qc) Returns a sub sequence of this value with the given start and length.Methods inherited from class org.basex.query.value.seq.Seq
copyInsert, ddo, description, equals, get, hash, initialCapacity, insertBefore, item, iter, plan, plan, refineType, seqType, size, subsequence, test, toErrorString, toJavaMethods inherited from class org.basex.query.value.Value
accept, checkUp, compile, copy, count, exprSize, has, inline, inlineable, isEmpty, isItem, iter, iterator, materialize, 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
-
subSeq
Description copied from class:SeqReturns a sub sequence of this value with the given start and length. -
insert
Description copied from class:SeqInserts an item at the given position into this sequence and returns the resulting sequence. -
remove
Description copied from class:SeqRemoves the item at the given position in this sequence and returns the resulting sequence. -
reverse
Description copied from class:ValueReturns all items of this value in reverse order. -
itemAt
Description copied from class:ValueReturns the item at the given position in the value. The specified value must be lie within the valid bounds. -
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,
-
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 long atomSize()Description copied from class:ValueComputes the number of atomized items.
-