Interface IIntegerItem
-
- All Superinterfaces:
IAnyAtomicItem
,IAtomicValuedItem
,IItem
,INumericItem
- All Known Subinterfaces:
INonNegativeIntegerItem
,IPositiveIntegerItem
- All Known Implementing Classes:
AbstractIntegerItem
public interface IIntegerItem extends INumericItem
-
-
Field Summary
Fields Modifier and Type Field Description static IIntegerItem
NEGATIVE_ONE
static IIntegerItem
ONE
static IIntegerItem
ZERO
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description IIntegerItem
abs()
Get the absolute value of the item.static IIntegerItem
cast(IAnyAtomicItem item)
default IIntegerItem
ceiling()
Round the value to the whole number closest to positive infinity.default IIntegerItem
floor()
Round the value to the whole number closest to negative infinity.BigInteger
getValue()
Get the item's "wrapped" value.static IIntegerItem
valueOf(long value)
static IIntegerItem
valueOf(String value)
Create an integer item from a string representing an integer value.static IIntegerItem
valueOf(BigInteger value)
-
Methods inherited from interface gov.nist.secauto.metaschema.core.metapath.item.atomic.IAnyAtomicItem
asString, getJavaTypeAdapter, newStringItem, toAtomicItem
-
Methods inherited from interface gov.nist.secauto.metaschema.core.metapath.item.atomic.INumericItem
asDecimal, asInteger, round, round, toEffectiveBoolean
-
-
-
-
Field Detail
-
ONE
@NonNull static final IIntegerItem ONE
-
ZERO
@NonNull static final IIntegerItem ZERO
-
NEGATIVE_ONE
@NonNull static final IIntegerItem NEGATIVE_ONE
-
-
Method Detail
-
valueOf
@NonNull static IIntegerItem valueOf(long value)
-
valueOf
@NonNull static IIntegerItem valueOf(@NonNull String value)
Create an integer item from a string representing an integer value.- Parameters:
value
- an integer value- Returns:
- the item
- Throws:
NumberFormatException
- if the provided value is not a valid representation of aBigInteger
-
valueOf
@NonNull static IIntegerItem valueOf(@NonNull BigInteger value)
-
cast
@NonNull static IIntegerItem cast(@NonNull IAnyAtomicItem item) throws InvalidValueForCastFunctionException
-
abs
IIntegerItem abs()
Description copied from interface:INumericItem
Get the absolute value of the item.- Specified by:
abs
in interfaceINumericItem
- Returns:
- this item negated if this item is negative, or the item otherwise
-
ceiling
default IIntegerItem ceiling()
Description copied from interface:INumericItem
Round the value to the whole number closest to positive infinity.- Specified by:
ceiling
in interfaceINumericItem
- Returns:
- the rounded value
-
floor
default IIntegerItem floor()
Description copied from interface:INumericItem
Round the value to the whole number closest to negative infinity.- Specified by:
floor
in interfaceINumericItem
- Returns:
- the rounded value
-
getValue
BigInteger getValue()
Description copied from interface:IItem
Get the item's "wrapped" value. This "wrapped" value may be:- In the case of an Assembly, a Java object representing the fields and flags of the assembly.
- In the case of a Field with flags, a Java object representing the field value and flags of the field.
- In the case of a Field without flags or a flag, a Java type managed by a
IDataTypeAdapter
or a primitive type provided by the Java standard library.
- Specified by:
getValue
in interfaceIAnyAtomicItem
- Specified by:
getValue
in interfaceIItem
- Returns:
- the value or
null
if the item has no available value
-
-