net.sf.saxon.value
public final class BigIntegerValue extends IntegerValue
Nested Class Summary | |
---|---|
protected static class | BigIntegerValue.BigIntegerComparable |
Field Summary | |
---|---|
static BigInteger | MAX_LONG |
static BigInteger | MAX_UNSIGNED_LONG |
static BigInteger | MIN_LONG |
static BigIntegerValue | ZERO |
Constructor Summary | |
---|---|
BigIntegerValue(BigInteger value)
Construct an xs:integer value from a Java BigInteger | |
BigIntegerValue(BigInteger value, AtomicType typeLabel)
Construct an xs:integer value from a Java BigInteger, supplying a type label.
| |
BigIntegerValue(long value)
Construct an xs:integer value from a Java long. |
Method Summary | |
---|---|
NumericValue | abs()
Get the absolute value as defined by the XPath abs() function |
BigInteger | asBigInteger()
Get the value as a BigInteger |
BigDecimal | asDecimal()
Convert the value to a BigDecimal |
NumericValue | ceiling()
Implement the XPath ceiling() function |
int | compareTo(Object other)
Compare the value to another numeric value
|
int | compareTo(long other)
Compare the value to a long |
ConversionResult | convertPrimitive(BuiltInAtomicType requiredType, boolean validate, XPathContext context)
Convert to target data type
|
ValidationFailure | convertToSubType(BuiltInAtomicType type, boolean validate)
This class allows subtypes of xs:integer to be held, as well as xs:integer values.
|
AtomicValue | copyAsSubType(AtomicType typeLabel)
Create a copy of this atomic value, with a different type label
|
NumericValue | div(IntegerValue other)
Divide by another integer
|
boolean | effectiveBooleanValue()
Return the effective boolean value of this integer
|
NumericValue | floor()
Implement the XPath floor() function |
BigDecimal | getDecimalValue()
Get the numeric value converted to a decimal
|
double | getDoubleValue()
Get the numeric value as a double
|
String | getPrimitiveStringValue()
Get the value as a String |
Comparable | getSchemaComparable()
Get an object that implements XML Schema comparison semantics |
int | hashCode()
Get the hashCode. |
IntegerValue | idiv(IntegerValue other)
Integer divide by another integer
|
boolean | isWholeNumber()
Determine whether the value is a whole number, that is, whether it compares
equal to some integer
|
boolean | isWithinLongRange()
Test whether the value is within the range that can be held in a 64-bit signed integer |
long | longValue()
Get the value as a long
|
IntegerValue | minus(IntegerValue other)
Subtract another integer |
IntegerValue | mod(IntegerValue other)
Take modulo another integer
|
NumericValue | negate()
Negate the value |
IntegerValue | plus(IntegerValue other)
Add another integer |
Value | reduce()
Reduce a value to its simplest form. |
NumericValue | round()
Implement the XPath round() function |
NumericValue | roundHalfToEven(int scale)
Implement the XPath round-to-half-even() function
|
double | signum()
Determine whether the value is negative, zero, or positive |
IntegerValue | times(IntegerValue other)
Multiply by another integer |
ValidationFailure | validateAgainstSubType(BuiltInAtomicType type)
This class allows subtypes of xs:integer to be held, as well as xs:integer values.
|
Parameters: value the supplied BigInteger
Parameters: value the value of the integer typeLabel the type, which must represent a type derived from xs:integer
Parameters: value the supplied Java long
Returns: the absolute value
Returns: the value of the xs:integer as a Java BigInteger
Returns: the resulting BigDecimal
Returns: the integer value, unchanged
Parameters: other the numeric value to be compared to this value
Returns: -1 if this value is less than the other, 0 if they are equal, +1 if this value is greater
Parameters: other the value to be compared with
Returns: -1 if this is less, 0 if this is equal, +1 if this is greater or if this is NaN
Parameters: requiredType identifies the required atomic type context the XPath dynamic evaluation context
Returns: an AtomicValue, a value of the required type; or an ErrorValue
Parameters: type the subtype of integer required
Returns: null if the operation succeeds, or a ValidationException if the value is out of range
Parameters: typeLabel the type label of the new copy. The caller is responsible for checking that the value actually conforms to this type.
Throws: net.sf.saxon.trans.XPathException if the other integer is zero
Returns: false if the integer is zero, otherwise true
Returns: the integer value, unchanged
Returns: a decimal representing this numeric value;
Returns: A double representing this numeric value; NaN if it cannot be converted
Returns: a String representation of the value
See Also: NumericValue
Throws: net.sf.saxon.trans.XPathException if the other integer is zero
Returns: always true for this implementation
Returns: true if the value is within range for a long
Returns: the value of the xs:integer, as a Java long
Throws: net.sf.saxon.trans.XPathException if the other integer is zero
Returns: the result of inverting the sign of the value
Returns: the integer value, unchanged
Parameters: scale number of digits required after the decimal point; the value -2 (for example) means round to a multiple of 100
Returns: if the scale is >=0, return this value unchanged. Otherwise round it to a multiple of 10**-scale
Returns: -1 if negative, 0 if zero, +1 if positive, NaN if NaN
Parameters: type the subtype of integer required
Returns: null if the operation succeeds, or a ValidationException if the value is out of range