Module dev.metaschema.core
Interface IPositiveIntegerItem
- All Superinterfaces:
IAnyAtomicItem,IAtomicValuedItem,ICollectionValue,IDecimalItem,IIntegerItem,IItem,INonNegativeIntegerItem,INumericItem
An atomic Metapath item containing a positive integer data value.
-
Field Summary
FieldsFields inherited from interface dev.metaschema.core.metapath.item.atomic.IIntegerItem
NEGATIVE_ONEFields inherited from interface dev.metaschema.core.metapath.item.atomic.INonNegativeIntegerItem
ZERO -
Method Summary
Modifier and TypeMethodDescriptionstatic IPositiveIntegerItemcast(IAnyAtomicItem item) Cast the provided type to this item type.default IPositiveIntegerItemcastAsType(IAnyAtomicItem item) Cast the provideditemto be the same type as this item.default IAtomicOrUnionType<IPositiveIntegerItem>getType()Get the type information for the item.type()Get the type information for this item.static IPositiveIntegerItemvalueOf(long value) Create an item from an existing integer value.static IPositiveIntegerItemvalueOf(INumericItem value) Create an item from an existing integer value.static IPositiveIntegerItemCreate an item from an existing integer value.static IPositiveIntegerItemvalueOf(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".
-
-
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- Specified by:
getTypein interfaceINonNegativeIntegerItem- 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 positive 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 positive 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 positive 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 positive 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 interfaceINonNegativeIntegerItem- Specified by:
castAsTypein interfaceINumericItem- Parameters:
item- the item to cast- Returns:
- an atomic item of this type
-