org.basex.query.xpath.expr
Class Equality

java.lang.Object
  extended by org.basex.query.ExprInfo
      extended by org.basex.query.xpath.expr.Expr
          extended by org.basex.query.xpath.expr.Arr
              extended by org.basex.query.xpath.expr.Cmp
                  extended by org.basex.query.xpath.expr.Equality

public final class Equality
extends Cmp

Equality Expression, evaluating comparisons.

Author:
Workgroup DBIS, University of Konstanz 2005-08, ISC License, Tim Petrowsky

Field Summary
 
Fields inherited from class org.basex.query.xpath.expr.Cmp
type
 
Fields inherited from class org.basex.query.xpath.expr.Arr
expr
 
Constructor Summary
Equality(Expr e1, Expr e2, Comp t)
          Constructor.
 
Method Summary
 Expr indexEquivalent(XPContext ctx, Step curr, boolean seq)
          Returns an equivalent expression which accesses an index structure.
 int indexSizes(XPContext ctx, Step curr, int min)
          Returns the number of results if this query is evaluated by an index.
 
Methods inherited from class org.basex.query.xpath.expr.Cmp
comp, eval, plan, standard, toString
 
Methods inherited from class org.basex.query.xpath.expr.Arr
sameAs, usesPos, usesSize
 
Methods inherited from class org.basex.query.xpath.expr.Expr
returnedValue
 
Methods inherited from class org.basex.query.ExprInfo
color, info, name
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Equality

public Equality(Expr e1,
                Expr e2,
                Comp t)
Constructor.

Parameters:
e1 - first expression
e2 - second expression to compare with first
t - Comp.EQ or Comp.NE
Method Detail

indexEquivalent

public Expr indexEquivalent(XPContext ctx,
                            Step curr,
                            boolean seq)
Description copied from class: Expr
Returns an equivalent expression which accesses an index structure.

Overrides:
indexEquivalent in class Expr
Parameters:
ctx - root
curr - location step
seq - flag for sequential evaluation
Returns:
Equivalent index-expression or null

indexSizes

public int indexSizes(XPContext ctx,
                      Step curr,
                      int min)
Description copied from class: Expr
Returns the number of results if this query is evaluated by an index. If Integer.MAX_VALUE is returned, no index access is possible.

Overrides:
indexSizes in class Expr
Parameters:
ctx - root
curr - the current location step
min - current minimum index hits
Returns:
number of expected results