public final class LongInteger extends GenericInteger
ArbitrarilyBigInteger
. More info:
https://jaxb.java.net/tutorial/section_2_2_2-Numeric-Types.htmlConstructor and Description |
---|
LongInteger(long value)
Creates instance from long argument
|
Modifier and Type | Method and Description |
---|---|
LongInteger |
abs()
Returns the absolute value of
this . |
LongInteger |
add(GenericInteger other)
Add integer to this.
|
BigInteger |
bigIntegerValue()
Convert to BigInteger
|
int |
compareTo(GenericInteger o) |
LongInteger |
divide(GenericInteger divisor)
Divide
this by some other number. |
double |
doubleValue() |
boolean |
equals(Object obj) |
float |
floatValue() |
int |
hashCode() |
int |
intValue() |
int |
intValueExact()
Converts this value to a primitive int safely, i.e.
|
long |
longValue() |
long |
longValueExact()
Converts this value to a primitive long safely, i.e.
|
LongInteger |
multiply(GenericInteger other)
Multiply
this by another integer. |
LongInteger |
remainder(GenericInteger divisor)
Returns this %
divisor |
LongInteger |
subtract(GenericInteger subtractedVal)
Subtract a number from this.
|
static LongInteger |
valueOf(long l)
Returns an
LongInteger instance representing the specified long value |
byteValue, shortValue
public LongInteger(long value)
value
- Java equivalent of xsd:longpublic static LongInteger valueOf(long l)
LongInteger
instance representing the specified long valuel
- integerl
public float floatValue()
floatValue
in class Number
public double doubleValue() throws IllegalArgumentException
doubleValue
in class Number
IllegalArgumentException
public int intValueExact() throws ArithmeticException
GenericInteger
intValueExact
in class GenericInteger
ArithmeticException
- if the value of this will not exactly fit into an int.public long longValueExact()
GenericInteger
longValueExact
in class GenericInteger
public BigInteger bigIntegerValue()
GenericInteger
bigIntegerValue
in class GenericInteger
BigInteger
public int compareTo(GenericInteger o)
public LongInteger abs()
GenericInteger
this
. Used by the XACML "abs" functions.abs
in class GenericInteger
public LongInteger add(GenericInteger other) throws ArithmeticException
GenericInteger
add
in class GenericInteger
other
- value to add to this valueArithmeticException
- if the result overflows the value space of this typepublic LongInteger multiply(GenericInteger other) throws ArithmeticException
GenericInteger
this
by another integer. Used by the XACML "multiply" functions.multiply
in class GenericInteger
other
- factor (other integer to multiply by)ArithmeticException
- if the result overflows the value space of this typepublic LongInteger divide(GenericInteger divisor) throws ArithmeticException
GenericInteger
this
by some other number. Used by XACML *-divide functions.divide
in class GenericInteger
divisor
- number by which this
is dividedArithmeticException
- if divisor is zeropublic LongInteger subtract(GenericInteger subtractedVal)
GenericInteger
subtract
in class GenericInteger
subtractedVal
- value to be subtracted from this
public LongInteger remainder(GenericInteger divisor) throws ArithmeticException
GenericInteger
divisor
remainder
in class GenericInteger
divisor
- second argumentArithmeticException
- if divisor is zeroCopyright © 2012–2020. All rights reserved.