Modifier and Type | Method and Description |
---|---|
Item |
atomItem(QueryContext qc,
InputInfo ii)
Evaluates the expression and returns zero or one atomized item, or an error.
|
static Value |
get(Item[] value)
Returns a value representation of the specified items.
|
static Value |
get(Item[] value,
int size)
Returns a value representation of the specified items.
|
static Value |
get(Item[] value,
int size,
Type type)
Returns a value representation of the specified items.
|
int |
hash(InputInfo ii)
Returns a hash code for this value.
|
Item |
item(QueryContext qc,
InputInfo ii)
Evaluates the expression and returns the resulting item,
or a
null reference if the expression yields an empty sequence. |
ValueIter |
iter()
Returns an iterator.
|
void |
plan(FElem plan)
Creates an expression tree.
|
abstract Value |
reverse()
Returns a sequence in reverse order.
|
long |
size()
Returns the sequence size or 1.
|
Item |
test(QueryContext qc,
InputInfo ii)
Performs a predicate test and returns the item the if test was successful.
|
String |
toErrorString()
Returns a string representation of the expression that can be embedded in error messages.
|
Object |
toJava()
Returns a Java representation of the value.
|
String |
toString() |
accept, atomSize, atomValue, atomValue, cache, checkUp, compile, copy, count, description, exprSize, has, homogeneous, inline, isValue, itemAt, iter, iterator, materialize, removable, serialize, serialize, value, writeTo
atomIter, data, ebv, hasFreeVars, indexAccessible, inlineAll, isEmpty, isFunction, isVacuous, iterable, markTailCalls, optimize, optimizeEbv, sameAs, seqType, typeCheck, uses, visitAll
public static Value get(Item[] value)
value
- valuepublic static Value get(Item[] value, int size)
value
- valuesize
- sizepublic static Value get(Item[] value, int size, Type type)
value
- valuesize
- sizetype
- sequence typepublic Object toJava() throws QueryException
Value
toJava
in class Value
QueryException
- query exceptionpublic final long size()
Expr
public final Item item(QueryContext qc, InputInfo ii) throws QueryException
Expr
null
reference if the expression yields an empty sequence.
If this method is not overwritten, Expr.iter(QueryContext)
must be implemented by an
expression, as it may be called by this method.item
in class Expr
qc
- query contextii
- input infonull
QueryException
- query exceptionpublic final Item test(QueryContext qc, InputInfo ii) throws QueryException
Expr
test
in class Expr
qc
- query contextii
- input infoQueryException
- query exceptionpublic final int hash(InputInfo ii) throws QueryException
Value
hash
in class Value
ii
- input infoQueryException
- if atomization can't be applied (e.g. function item)public final Item atomItem(QueryContext qc, InputInfo ii) throws QueryException
Expr
atomItem
in class Expr
qc
- query contextii
- input infoQueryException
- query exceptionpublic abstract Value reverse()
public void plan(FElem plan)
ExprInfo
public final String toErrorString()
ExprInfo
ExprInfo.toString()
.toErrorString
in class ExprInfo
Copyright © 2005–2015 BaseX Team. All rights reserved.