net.sf.saxon.value
public final class DecimalValue extends NumericValue
| Field Summary | |
|---|---|
| static BigDecimal | ONE |
| static BigDecimal | ONE_MILLION |
| static BigInteger | TEN |
| Constructor Summary | |
|---|---|
| DecimalValue(BigDecimal value)
Constructor supplying a BigDecimal | |
| DecimalValue(double in)
Constructor supplying a double | |
| DecimalValue(long in)
Constructor supplying a long integer | |
| Method Summary | |
|---|---|
| NumericValue | arithmetic(int operator, NumericValue other, XPathContext context)
Evaluate a binary arithmetic operator. |
| NumericValue | ceiling()
Implement the XPath ceiling() function |
| int | compareTo(Object other)
Compare the value to another numeric value |
| AtomicValue | convertPrimitive(BuiltInAtomicType requiredType, boolean validate, XPathContext context)
Convert to target data type |
| Object | convertToJava(Class target, XPathContext context)
Convert to Java object (for passing to external functions) |
| static String | decimalToString(BigDecimal value) |
| boolean | effectiveBooleanValue(XPathContext context) |
| NumericValue | floor()
Implement the XPath floor() function |
| ItemType | getItemType(TypeHierarchy th)
Determine the data type of the expression |
| String | getStringValue()
Get the value as a String |
| BigDecimal | getValue()
Get the value |
| int | hashCode()
Get the hashCode. |
| boolean | isWholeNumber()
Determine whether the value is a whole number, that is, whether it compares
equal to some integer |
| static AtomicValue | makeDecimalValue(CharSequence in, boolean validate)
Factory method to construct a DecimalValue from a string |
| NumericValue | negate()
Negate the value |
| NumericValue | round()
Implement the XPath round() function |
| NumericValue | roundToHalfEven(int scale)
Implement the XPath round-to-half-even() function |
| boolean | schemaEquals(Value obj)
Compare two values for equality. |
| double | signum()
Determine whether the value is negative, zero, or positive |
Parameters: value the value of the DecimalValue
Parameters: in the value of the DecimalValue
Parameters: in the value of the DecimalValue
Parameters: th
Returns: Type.DECIMAL
Returns: a String representation of the value
See Also: NumericValue
Parameters: in the value of the DecimalValue validate true if validation is required; false if the caller knows that the value is valid
Returns: the required DecimalValue if the input is valid, or an ErrorValue encapsulating the error message if not.
Returns: -1 if negative, 0 if zero, +1 if positive, NaN if NaN