|
||||||||||
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 Expr
ctx
- query context
public Iter iter(QueryContext ctx)
Expr
Expr.atomic(org.basex.query.QueryContext)
must be implemented.
iter
in class Expr
ctx
- query context
public Iter iter()
public Item atomic(QueryContext ctx) throws QueryException
Expr
null
reference.
If this method is not overwritten, Expr.iter(org.basex.query.QueryContext)
must be implemented.
atomic
in class Expr
ctx
- query context
QueryException
- query exceptionpublic Item ebv(QueryContext ctx) throws QueryException
Expr
ebv
in class Expr
ctx
- query context
QueryException
- query exceptionpublic Item test(QueryContext ctx) throws QueryException
Expr
test
in class Expr
ctx
- query context
QueryException
- query exceptionpublic boolean i()
Expr
i
in class Expr
public long size(QueryContext ctx)
Expr
size
in class Expr
ctx
- 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 exceptionpublic BigDecimal dec() throws QueryException
QueryException
- query exceptionpublic long itr() throws QueryException
QueryException
- query exceptionpublic float flt() throws QueryException
QueryException
- query exceptionpublic double dbl() throws QueryException
QueryException
- query exceptionpublic abstract boolean eq(Item it) throws QueryException
it
- item to be compared
QueryException
- query exceptionpublic int diff(Item it) throws QueryException
it
- item to be compared
QueryException
- query exceptionpublic double score()
public final void score(double s)
s
- score valuepublic void serialize(Serializer ser) throws IOException
ser
- serializer
IOException
- I/O exceptionpublic boolean uses(Expr.Use u, QueryContext ctx)
Expr
true
is returned by default and thus assumed as "worst-case".
uses
in class Expr
u
- use type to be checkedctx
- query context
public boolean removable(Var v, QueryContext ctx)
Expr
removable
in class Expr
v
- variable to be removedctx
- query context
public Return returned(QueryContext ctx)
Expr
returned
in class Expr
ctx
- query context
public boolean duplicates(QueryContext ctx)
Expr
duplicates
in class Expr
ctx
- query context
public final String name()
ExprInfo
name
in class ExprInfo
public void plan(Serializer ser) throws IOException
ExprInfo
plan
in class ExprInfo
ser
- serializer
IOException
- I/O exceptionpublic int hashCode()
hashCode
in class Object
public String toString()
toString
in class ExprInfo
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |