Modifier and Type | Method and Description |
---|---|
Dec |
abs()
Returns an absolute value.
|
boolean |
bool(InputInfo ii)
Returns a boolean representation of the value.
|
Dec |
ceiling()
Returns an ceiling value.
|
double |
dbl()
Returns an double representation of the value.
|
BigDecimal |
dec(InputInfo ii)
Returns a decimal representation of the value.
|
int |
diff(Item it,
Collation coll,
InputInfo ii)
Returns the difference between the current and the specified item.
|
boolean |
eq(Item it,
Collation coll,
StaticContext sc,
InputInfo ii)
Checks the items for equality.
|
Dec |
floor()
Returns an floor value.
|
float |
flt()
Returns an float representation of the value.
|
static Dec |
get(BigDecimal value)
Constructor.
|
static Dec |
get(double value)
Constructor.
|
long |
itr()
Returns an integer (long) representation of the value.
|
static BigDecimal |
parse(byte[] value,
InputInfo ii)
Converts the given token into a decimal value.
|
Dec |
round(int scale,
boolean even)
Returns a rounded value.
|
boolean |
sameAs(Expr cmp)
Compares the current and specified expression for equality.
|
byte[] |
string()
Returns a string representation of the value.
|
Object |
toJava()
Returns a Java representation of the value.
|
dbl, flt, hash, itr, string, test, toString
atomItem, atomItem, atomSize, atomValue, comparable, description, ebv, equiv, homogeneous, input, item, itemAt, iter, iterable, materialize, plan, score, score, seqType, size, typeId, writeTo, xdmInfo
accept, atomValue, cache, checkUp, compile, copy, count, exprSize, has, inline, isValue, iter, iterator, removable, serialize, serialize, value
atomIter, data, hasFreeVars, indexAccessible, inlineAll, isEmpty, isFunction, isVacuous, markTailCalls, optimize, optimizeEbv, typeCheck, uses, visitAll
public static Dec get(BigDecimal value)
value
- big decimal valuepublic static Dec get(double value)
value
- big decimal valuepublic byte[] string()
ANum
public boolean bool(InputInfo ii)
Item
public long itr()
ANum
public float flt()
ANum
public double dbl()
ANum
public BigDecimal dec(InputInfo ii)
Item
public Dec round(int scale, boolean even)
ANum
public boolean eq(Item it, Collation coll, StaticContext sc, InputInfo ii) throws QueryException
Item
eq
in class Item
it
- item to be comparedcoll
- collationsc
- static contextii
- input infoQueryException
- query exceptionpublic int diff(Item it, Collation coll, InputInfo ii) throws QueryException
Item
diff
in class Item
it
- item to be comparedcoll
- query contextii
- input infoQueryException
- query exceptionpublic Object toJava()
Value
public boolean sameAs(Expr cmp)
Expr
public static BigDecimal parse(byte[] value, InputInfo ii) throws QueryException
value
- value to be convertedii
- input infoQueryException
- query exceptionCopyright © 2005–2015 BaseX Team. All rights reserved.