N
- actual Java type of the underlying numeric value (Integer, Double...)NAV
- Concrete numeric AttributeValue type subclasspublic abstract class NumericValue<N extends Number,NAV extends NumericValue<N,NAV>> extends StringParseableValue<N>
StringParseableValue.Factory<AV extends AttributeValue>
SimpleValue.BaseFactory<AV extends AttributeValue>
value
Modifier | Constructor and Description |
---|---|
protected |
NumericValue(N val)
Constructor for NumericValue.
|
Modifier and Type | Method and Description |
---|---|
abstract NAV |
abs()
Returns the absolute value of
this . |
abstract NAV |
add(Deque<? extends NAV> others)
Adds numbers to this.
|
abstract NAV |
divide(NAV divisor)
Divide
this by some other number. |
abstract NAV |
multiply(Deque<? extends NAV> others)
Multiply
this by other numbers. |
abstract NAV |
subtract(NAV subtractedVal)
Subtract a number from this.
|
getXmlAttributes
equals, getContent, getUnderlyingValue, hashCode, printXML, toString
protected NumericValue(N val) throws IllegalArgumentException, NullPointerException
Constructor for NumericValue.
val
- a N object.IllegalArgumentException
- if rawVal == null
NullPointerException
- if datatypeId == null
public abstract NAV abs()
this
. Used by the XACML "abs" functions.public abstract NAV add(Deque<? extends NAV> others) throws ArithmeticException
others
- values to add to this valueArithmeticException
- if the result overflows the value space of N
public abstract NAV subtract(NAV subtractedVal) throws ArithmeticException
subtractedVal
- value to be subtracted from this
ArithmeticException
- if the result overflows the value space of N
public abstract NAV multiply(Deque<? extends NAV> others) throws ArithmeticException
this
by other numbers. Used by the XACML "multiply" functions.others
- other values to multiply byArithmeticException
- if the result overflows the value space of N
public abstract NAV divide(NAV divisor) throws ArithmeticException
this
by some other number. Used by XACML *-divide functions.divisor
- number by which this
is dividedArithmeticException
- if divisor is zeroCopyright © 2012–2020. All rights reserved.