|
||||||||||
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.xquery.expr.Expr
org.basex.query.xquery.item.Item
org.basex.query.xquery.item.Num
org.basex.query.xquery.item.Dec
public final class Dec
Decimal item.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.basex.query.xquery.expr.Expr |
---|
Expr.Return, Expr.Using |
Field Summary | |
---|---|
static Dec |
ZERO
Zero value. |
Fields inherited from class org.basex.query.xquery.item.Item |
---|
type |
Constructor Summary | |
---|---|
Dec(java.math.BigDecimal d,
Type t)
Constructor. |
|
Dec(byte[] t)
Constructor. |
Method Summary | |
---|---|
boolean |
bool()
Returns a boolean representation of the item. |
double |
dbl()
Returns a double representation of the item. |
java.math.BigDecimal |
dec()
Returns a decimal representation of the item. |
int |
diff(Item it)
Returns the difference between the current and the specified item. |
boolean |
eq(Item it)
Checks the items for equality. |
float |
flt()
Returns a float representation of the item. |
static Dec |
get(java.math.BigDecimal d)
Constructor. |
int |
hash()
Returns a hash code. |
static Iter |
iter(java.math.BigDecimal v)
Returns an iterator. |
static Iter |
iter(double d)
Returns an iterator. |
long |
itr()
Returns an integer (long) representation of the item. |
java.lang.Object |
java()
Returns a Java object. |
static java.math.BigDecimal |
parse(byte[] val)
Converts the given token into a decimal value. |
static java.math.BigDecimal |
parse(double val)
Converts the given double into a decimal value. |
byte[] |
str()
Returns an atomized string. |
Methods inherited from class org.basex.query.xquery.item.Item |
---|
castErr, comp, d, i, iter, iter, n, name, node, plan, returned, s, score, score, serialize, size, toString, u, uses |
Methods inherited from class org.basex.query.xquery.expr.Expr |
---|
e |
Methods inherited from class org.basex.query.ExprInfo |
---|
color, info |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final Dec ZERO
Constructor Detail |
---|
public Dec(byte[] t)
t
- string representationpublic Dec(java.math.BigDecimal d, Type t)
d
- decimal valuet
- string representationMethod Detail |
---|
public static Dec get(java.math.BigDecimal d)
d
- big decimal value
public static Iter iter(java.math.BigDecimal v)
v
- double value
public static Iter iter(double d)
d
- double value
public byte[] str()
Item
str
in class Item
public boolean bool()
Item
bool
in class Item
public long itr()
Item
itr
in class Item
public float flt()
Item
flt
in class Item
public double dbl()
Item
dbl
in class Item
public java.math.BigDecimal dec()
Item
dec
in class Item
public boolean eq(Item it) throws XQException
Item
eq
in class Item
it
- item to be compared.
XQException
- evaluation exceptionpublic int diff(Item it) throws XQException
Item
diff
in class Item
it
- item to be compared.
XQException
- evaluation exceptionpublic int hash()
Item
hash
in class Item
public java.lang.Object java()
Item
java
in class Item
public static java.math.BigDecimal parse(double val) throws XQException
val
- value to be converted
XQException
- possible converting exceptionpublic static java.math.BigDecimal parse(byte[] val) throws XQException
val
- value to be converted
XQException
- possible converting exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |