Interface INumericItem
-
- All Superinterfaces:
IAnyAtomicItem
,IAtomicValuedItem
,IItem
- All Known Subinterfaces:
IDecimalItem
,IIntegerItem
,INonNegativeIntegerItem
,IPositiveIntegerItem
- All Known Implementing Classes:
AbstractIntegerItem
,AbstractNumericItem
public interface INumericItem extends IAnyAtomicItem
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description INumericItem
abs()
Get the absolute value of the item.BigDecimal
asDecimal()
BigInteger
asInteger()
static INumericItem
cast(IAnyAtomicItem item)
IIntegerItem
ceiling()
Round the value to the whole number closest to positive infinity.IIntegerItem
floor()
Round the value to the whole number closest to negative infinity.default INumericItem
round()
default INumericItem
round(IIntegerItem precisionItem)
boolean
toEffectiveBoolean()
-
Methods inherited from interface gov.nist.secauto.metaschema.core.metapath.item.atomic.IAnyAtomicItem
asString, getJavaTypeAdapter, getValue, newStringItem, toAtomicItem
-
-
-
-
Method Detail
-
cast
@NonNull static INumericItem cast(@NonNull IAnyAtomicItem item) throws InvalidValueForCastFunctionException
-
asDecimal
@NonNull BigDecimal asDecimal()
-
asInteger
@NonNull BigInteger asInteger()
-
toEffectiveBoolean
boolean toEffectiveBoolean()
-
abs
@NonNull INumericItem abs()
Get the absolute value of the item.- Returns:
- this item negated if this item is negative, or the item otherwise
-
ceiling
@NonNull IIntegerItem ceiling()
Round the value to the whole number closest to positive infinity.- Returns:
- the rounded value
-
floor
@NonNull IIntegerItem floor()
Round the value to the whole number closest to negative infinity.- Returns:
- the rounded value
-
round
@NonNull default INumericItem round()
-
round
@NonNull default INumericItem round(@NonNull IIntegerItem precisionItem)
-
-