Package org.basex.query.value.seq
Class IntSeq
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.IntSeq
Sequence of items of type
xs:integer, containing at least two of them.- Author:
- BaseX Team 2005-21, BSD License, Leo Woerteler
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionfinal longatomSize()Computes the number of atomized items.atomValue(QueryContext qc, InputInfo ii) Evaluates the expression and returns the atomized items.final voidCaches lazy values.ebv(QueryContext qc, InputInfo ii) Checks if the effective boolean value can be computed for this expression:booleanThis function is e.g.static Valueget(int[] values) Creates an xs:integer sequence with the specified items.static Valueget(long[] values) Creates an xs:integer sequence with the specified items.static ValueCreates a sequence with the specified items.final Valueinsert(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.final Valueremove(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.simplifyFor(CompileContext.Simplify mode, CompileContext cc) This function is called at compile time for expressions whose operands might be simplified.toJava()Returns a Java representation of the value.long[]values()Returns the internal values.Methods inherited from class org.basex.query.value.seq.Seq
copyInsert, ddo, description, get, hash, initialCapacity, insertBefore, item, iter, plan, plan, refineType, seqType, size, subSeq, subsequence, test, toErrorStringMethods 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, 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
-
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. -
reverse
Description copied from class:ValueReturns all items of this value in reverse order. -
values
public long[] values()Returns the internal values.- Returns:
- values
-
simplifyFor
Description copied from class:ExprThis function is called at compile time for expressions whose operands might be simplified.- Overrides:
simplifyForin classExpr- Parameters:
mode- mode of simplificationcc- compilation context- Returns:
- simplified or original expression
- Throws:
QueryException- query exception- See Also:
-
toJava
Description copied from class:ValueReturns a Java representation of the value. -
equals
Description copied from class:ExprThis function is e.g. called by:If.optimize(CompileContext),Switch.optimize(CompileContext),Typeswitch.optimize(CompileContext), in order to discard identical expressions.CmpR.mergeEbv(Expr, boolean, CompileContext)orCmpSR.mergeEbv(Expr, boolean, CompileContext), in order to merge expressions with identical input.CmpG.optimize(CompileContext)orCmpV.optimize(CompileContext), in order to pre-evaluate equality tests.CmpG.optimize(CompileContext)orPos.get(Expr, CmpV.OpV, InputInfo, CompileContext), in order to compare the start and end value.PathCache, in order to find identical root values at runtime.
-
get
Creates an xs:integer sequence with the specified items.- Parameters:
values- values- Returns:
- value
-
get
Creates an xs:integer sequence with the specified items.- Parameters:
values- values- Returns:
- value
-
get
Creates a sequence with the specified items.- Parameters:
values- valuestype- type- Returns:
- value
-
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. -
atomValue
Description copied from class:ExprEvaluates the expression and returns the atomized items. -
atomSize
public final long atomSize()Description copied from class:ValueComputes the number of atomized items. -
insert
Inserts an item at the given position into this sequence and returns the resulting sequence. Because this function will mostly be invoked recursively, the standard implementation will be called, because its runtime outweighs the possibly higher memory consumption. -
remove
Removes the item at the given position in this sequence and returns the resulting sequence. Because this function will mostly be invoked recursively, the standard implementation will be called, because its runtime outweighs the possibly higher memory consumption.
-