|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.basex.query.ExprInfo
org.basex.query.expr.Expr
org.basex.query.item.Item
public abstract class Item
Abstract item.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class org.basex.query.expr.Expr |
|---|
Expr.Use |
| Field Summary | |
|---|---|
double |
score
Score value. |
Type |
type
Data type. |
| Method Summary | |
|---|---|
Item |
atomic(QueryContext ctx)
Evaluates the expression and returns the resulting item or a null reference. |
boolean |
bool()
Returns a boolean representation of the item. |
Expr |
comp(QueryContext ctx)
Optimizes and compiles the expression. |
boolean |
d()
Checks if this is a duration. |
double |
dbl()
Returns a double representation of the item. |
BigDecimal |
dec()
Returns a decimal representation of the item. |
int |
diff(Item it)
Returns the difference between the current and the specified item. |
boolean |
duplicates(QueryContext ctx)
Returns true if the expression might yield duplicates and unsorted results. |
Item |
ebv(QueryContext ctx)
Checks if the iterator can be dissolved into an effective boolean value. |
abstract boolean |
eq(Item it)
Checks the items for equality. |
float |
flt()
Returns a float representation of the item. |
int |
hashCode()
|
boolean |
i()
Checks if this is an item. |
Iter |
iter()
Returns an item iterator. |
Iter |
iter(QueryContext ctx)
Evaluates the expression and returns an iterator on the resulting items. |
long |
itr()
Returns an integer (long) representation of the item. |
Object |
java()
Returns a Java object. |
boolean |
n()
Checks if this is a numeric item. |
String |
name()
Returns the simplified class name. |
boolean |
node()
Checks if this is a node. |
void |
plan(Serializer ser)
Recursively sends the abstract syntax of this expression to the specified serializer. |
boolean |
removable(Var v,
QueryContext ctx)
Checks if the specified variable is removable. |
Return |
returned(QueryContext ctx)
Indicates the return type of an expression. |
boolean |
s()
Checks if this is a string item. |
double |
score()
Returns a score value. |
void |
score(double s)
Sets a new score value. |
void |
serialize(Serializer ser)
Serializes the item. |
long |
size(QueryContext ctx)
Returns the sequence size or 1. |
byte[] |
str()
Returns an atomized string. |
Item |
test(QueryContext ctx)
Performs a predicate test and returns the item if test was successful. |
String |
toString()
|
boolean |
u()
Checks if this is an untyped item. |
boolean |
uses(Expr.Use u,
QueryContext ctx)
Indicates if an expression uses the specified type. |
| Methods inherited from class org.basex.query.expr.Expr |
|---|
addText, checkCtx, checkDbl, checkItr, e, indexAccessible, indexEquivalent, remove, sameAs, v |
| Methods inherited from class org.basex.query.ExprInfo |
|---|
color, info |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public double score
public Type type
| Method Detail |
|---|
public Expr comp(QueryContext ctx)
Expr
comp in class Exprctx - query context
public Iter iter(QueryContext ctx)
ExprExpr.atomic(org.basex.query.QueryContext) must be implemented.
iter in class Exprctx - query context
public Iter iter()
public Item atomic(QueryContext ctx)
throws QueryException
Exprnull reference.
If this method is not overwritten, Expr.iter(org.basex.query.QueryContext) must be implemented.
atomic in class Exprctx - query context
QueryException - query exception
public Item ebv(QueryContext ctx)
throws QueryException
Expr
ebv in class Exprctx - query context
QueryException - query exception
public Item test(QueryContext ctx)
throws QueryException
Expr
test in class Exprctx - query context
QueryException - query exceptionpublic boolean i()
Expr
i in class Exprpublic long size(QueryContext ctx)
Expr
size in class Exprctx - query context
public final boolean n()
public final boolean u()
public final boolean s()
public final boolean d()
public final boolean node()
public byte[] str()
public Object java()
public boolean bool()
throws QueryException
QueryException - query exception
public BigDecimal dec()
throws QueryException
QueryException - query exception
public long itr()
throws QueryException
QueryException - query exception
public float flt()
throws QueryException
QueryException - query exception
public double dbl()
throws QueryException
QueryException - query exception
public abstract boolean eq(Item it)
throws QueryException
it - item to be compared
QueryException - query exception
public int diff(Item it)
throws QueryException
it - item to be compared
QueryException - query exceptionpublic double score()
public final void score(double s)
s - score value
public void serialize(Serializer ser)
throws IOException
ser - serializer
IOException - I/O exception
public boolean uses(Expr.Use u,
QueryContext ctx)
Exprtrue is returned by default and thus assumed as "worst-case".
uses in class Expru - use type to be checkedctx - query context
public boolean removable(Var v,
QueryContext ctx)
Expr
removable in class Exprv - variable to be removedctx - query context
public Return returned(QueryContext ctx)
Expr
returned in class Exprctx - query context
public boolean duplicates(QueryContext ctx)
Expr
duplicates in class Exprctx - query context
public final String name()
ExprInfo
name in class ExprInfo
public void plan(Serializer ser)
throws IOException
ExprInfo
plan in class ExprInfoser - serializer
IOException - I/O exceptionpublic int hashCode()
hashCode in class Objectpublic String toString()
toString in class ExprInfo
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||