public final class MediumInteger extends GenericInteger
LongInteger
.Constructor and Description |
---|
MediumInteger(int value)
Creates instance from integer argument
|
Modifier and Type | Method and Description |
---|---|
MediumInteger |
abs()
Returns the absolute value of
this . |
MediumInteger |
add(GenericInteger other)
Add integer to this.
|
BigInteger |
bigIntegerValue()
Convert to BigInteger
|
int |
compareTo(GenericInteger o) |
MediumInteger |
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.
|
MediumInteger |
multiply(GenericInteger other)
Multiply
this by another integer. |
MediumInteger |
remainder(GenericInteger divisor)
Returns this %
divisor |
MediumInteger |
subtract(GenericInteger subtractedVal)
Subtract a number from this.
|
static MediumInteger |
valueOf(int i)
Returns an
MediumInteger instance representing the specified int value |
byteValue, shortValue
public MediumInteger(int value)
value
- Java equivalent of xsd:intpublic static MediumInteger valueOf(int i)
MediumInteger
instance representing the specified int valuei
- integeri
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 MediumInteger abs()
GenericInteger
this
. Used by the XACML "abs" functions.abs
in class GenericInteger
public MediumInteger 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 MediumInteger 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 MediumInteger 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 MediumInteger subtract(GenericInteger subtractedVal)
GenericInteger
subtract
in class GenericInteger
subtractedVal
- value to be subtracted from this
public MediumInteger remainder(GenericInteger divisor) throws ArithmeticException
GenericInteger
divisor
remainder
in class GenericInteger
divisor
- second argumentArithmeticException
- if divisor is zeroCopyright © 2012–2020. All rights reserved.