Module dev.metaschema.core
Interface INonNegativeIntegerItem
- All Superinterfaces:
IAnyAtomicItem,IAtomicValuedItem,ICollectionValue,IDecimalItem,IIntegerItem,IItem,INumericItem
- All Known Subinterfaces:
IPositiveIntegerItem
An atomic Metapath item containing a non-negative integer data value.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final INonNegativeIntegerItemThe integer value "1".static final INonNegativeIntegerItemThe integer value "0".Fields inherited from interface dev.metaschema.core.metapath.item.atomic.IIntegerItem
NEGATIVE_ONE -
Method Summary
Modifier and TypeMethodDescriptionstatic INonNegativeIntegerItemcast(IAnyAtomicItem item) Cast the provided type to this item type.default INonNegativeIntegerItemcastAsType(IAnyAtomicItem item) Cast the provideditemto be the same type as this item.default IAtomicOrUnionType<? extends INonNegativeIntegerItem>getType()Get the type information for the item.type()Get the type information for this item.static INonNegativeIntegerItemvalueOf(long value) Create an item from an existing integer value.static INonNegativeIntegerItemvalueOf(INumericItem value) Create an item from an existing integer value.static INonNegativeIntegerItemCreate an item from an existing integer value.static INonNegativeIntegerItemvalueOf(BigInteger value) Create an item from an existing integer value.Methods inherited from interface dev.metaschema.core.metapath.item.atomic.IAnyAtomicItem
accept, asMapKey, asString, asStringItem, atomize, deepEquals, getJavaTypeAdapter, getValue, toAtomicItemMethods inherited from interface dev.metaschema.core.metapath.item.ICollectionValue
deepEquals, toSignatureMethods inherited from interface dev.metaschema.core.metapath.item.atomic.IDecimalItem
add, compareTo, divide, integerDivide, mod, multiply, subtract, toEffectiveBooleanMethods inherited from interface dev.metaschema.core.metapath.item.atomic.IIntegerItem
abs, add, ceiling, compareTo, floor, integerDivide, mod, multiply, negate, subtract, toIntValueExactMethods inherited from interface dev.metaschema.core.metapath.item.IItem
contentsAsSequence, flatten, hasValue, toSequence
-
Field Details
-
ONE
The integer value "1". -
ZERO
The integer value "0".
-
-
Method Details
-
type
Get the type information for this item.- Returns:
- the type information
-
getType
Description copied from interface:IItemGet the type information for the item.- Specified by:
getTypein interfaceIDecimalItem- Specified by:
getTypein interfaceIIntegerItem- Specified by:
getTypein interfaceIItem- Returns:
- the item's type information
-
valueOf
Create an item from an existing integer value.- Parameters:
value- a string representing an integer value- Returns:
- the item
- Throws:
InvalidTypeMetapathException- if the provided value is not a non-negative integer
-
valueOf
Create an item from an existing integer value.- Parameters:
value- an integer value- Returns:
- the item
- Throws:
InvalidTypeMetapathException- if the provided value is not a non-negative integer
-
valueOf
Create an item from an existing integer value.- Parameters:
value- an integer value- Returns:
- the item
- Throws:
InvalidTypeMetapathException- if the provided value is not a non-negative integer
-
valueOf
Create an item from an existing integer value.- Parameters:
value- an integer value- Returns:
- the item
- Throws:
InvalidTypeMetapathException- if the provided value is not a non-negative integer
-
cast
Cast the provided type to this item type.- Parameters:
item- the item to cast- Returns:
- the original item if it is already this type, otherwise a new item cast to this type
- Throws:
InvalidValueForCastFunctionException- if the provideditemcannot be cast to this type
-
castAsType
Description copied from interface:IAnyAtomicItemCast the provideditemto be the same type as this item.- Specified by:
castAsTypein interfaceIAnyAtomicItem- Specified by:
castAsTypein interfaceIDecimalItem- Specified by:
castAsTypein interfaceIIntegerItem- Specified by:
castAsTypein interfaceINumericItem- Parameters:
item- the item to cast- Returns:
- an atomic item of this type
-