org.basex.query.value.seq
Class NativeSeq
java.lang.Object
org.basex.data.ExprInfo
org.basex.query.expr.Expr
org.basex.query.value.Value
org.basex.query.value.seq.Seq
org.basex.query.value.seq.NativeSeq
- All Implemented Interfaces:
- java.lang.Iterable<Item>
- Direct Known Subclasses:
- BlnSeq, BytSeq, DblSeq, DBNodeSeq, DecSeq, FltSeq, IntSeq, StrSeq
public abstract class NativeSeq
- extends Seq
Sequence of items, which are stored in their primitive/native representation.
- Author:
- BaseX Team 2005-12, BSD License, Christian Gruen
Nested classes/interfaces inherited from class org.basex.query.expr.Expr |
Expr.Flag |
Fields inherited from class org.basex.query.value.Value |
type |
Constructor Summary |
protected |
NativeSeq(int s,
Type t)
Constructor. |
Method Summary |
Item |
ebv(QueryContext ctx,
InputInfo ii)
Checks if the iterator can be dissolved into an effective boolean value. |
boolean |
homogeneous()
Checks if all items of this value share the same type. |
SeqType |
type()
Returns the static type of the evaluated value. |
int |
writeTo(Item[] arr,
int start)
Writes this value's items out to the given array. |
Methods inherited from class org.basex.query.value.seq.Seq |
get, get, hash, item, iter, plan, reverse, size, sub, test, toJava, toString |
Methods inherited from class org.basex.query.value.Value |
accept, cache, checkUp, compile, copy, count, data, description, exprSize, has, inline, isValue, itemAt, iter, iterator, removable, serialize, value |
Methods inherited from class org.basex.query.expr.Expr |
addText, compEbv, copy, hasFreeVars, indexAccessible, indexEquivalent, inlineAll, isEmpty, isFunction, isItem, isVacuous, iterable, markTailCalls, optimize, sameAs, uses, visitAll |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
NativeSeq
protected NativeSeq(int s,
Type t)
- Constructor.
- Parameters:
s
- number of itemst
- item type
ebv
public Item ebv(QueryContext ctx,
InputInfo ii)
throws QueryException
- Description copied from class:
Expr
- Checks if the iterator can be dissolved into an effective boolean value.
If not, returns an error. If yes, returns the first value - which can be
also be e.g. an integer, which is later evaluated as numeric predicate.
- Specified by:
ebv
in class Expr
- Parameters:
ctx
- query contextii
- input info
- Returns:
- item
- Throws:
QueryException
- query exception
writeTo
public final int writeTo(Item[] arr,
int start)
- Description copied from class:
Value
- Writes this value's items out to the given array.
- Specified by:
writeTo
in class Value
- Parameters:
arr
- array to write tostart
- start position
- Returns:
- number of written items
homogeneous
public final boolean homogeneous()
- Description copied from class:
Value
- Checks if all items of this value share the same type.
- Specified by:
homogeneous
in class Value
- Returns:
- result of check
type
public final SeqType type()
- Description copied from class:
Expr
- Returns the static type of the evaluated value. For simplicity, some types have been
merged to super types. As an example, many numeric types are treated as integers.
- Specified by:
type
in class Expr
- Returns:
- result of check