|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.basex.query.xpath.expr.Expr
org.basex.query.xpath.values.Item
org.basex.query.xpath.values.Num
public final class Num
XPath value type modeling a number.
| Field Summary | |
|---|---|
static Num |
ONE
Static number. |
| Constructor Summary | |
|---|---|
Num(byte[] n)
Constructor. |
|
Num(double n)
Constructor. |
|
Num(long n)
Constructor. |
|
| Method Summary | |
|---|---|
boolean |
appr(Item v)
Checks the approximate equality of the value and the specified value. |
boolean |
bool()
Returns the boolean value. |
boolean |
eq(Item v)
Checks the equality of the value and the specified value. |
Num |
eval(XPContext ctx)
Evaluates the expression with the specified context set. |
double |
num()
Returns the double value. |
int |
prec()
Returns the evaluation precedence. |
byte[] |
str()
Returns the literal value. |
java.lang.String |
toString()
|
| Methods inherited from class org.basex.query.xpath.values.Item |
|---|
compile, sameAs, serialize, serialize, size, usesPos, usesSize |
| Methods inherited from class org.basex.query.xpath.expr.Expr |
|---|
indexEquivalent, indexSizes, returnedValue, sameAs |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final Num ONE
| Constructor Detail |
|---|
public Num(byte[] n)
n - number to be represented.public Num(double n)
n - number to be represented.public Num(long n)
n - number to be represented.| Method Detail |
|---|
public boolean appr(Item v)
Item
v - value to be compared
public boolean bool()
Item
bool in class Itempublic boolean eq(Item v)
Item
eq in class Itemv - value to be compared
public Num eval(XPContext ctx)
Expr
eval in class Exprctx - query context
public double num()
Item
num in class Itempublic int prec()
Item
public byte[] str()
Item
str in class Itempublic java.lang.String toString()
toString in class Item
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||