- All Superinterfaces:
IAnyAtomicItem,IAtomicValuedItem,ICollectionValue,IItem,IStringItem
An atomic Metapath item containing a text token data value.
-
Method Summary
Modifier and TypeMethodDescriptionstatic ITokenItemcast(IAnyAtomicItem item) Cast the provided type to this item type.default ITokenItemcastAsType(IAnyAtomicItem item) Cast the provideditemto be the same type as this item.default IAtomicOrUnionType<ITokenItem>getType()Get the type information for the item.static IAtomicOrUnionType<ITokenItem>type()Get the type information for this item.static ITokenItemConstruct a new item using the provided stringvalue.Methods inherited from interface dev.metaschema.core.metapath.item.atomic.IAnyAtomicItem
accept, asMapKey, asString, atomize, deepEquals, getJavaTypeAdapter, getValue, toAtomicItemMethods inherited from interface dev.metaschema.core.metapath.item.ICollectionValue
deepEquals, toSignatureMethods inherited from interface dev.metaschema.core.metapath.item.IItem
contentsAsSequence, flatten, hasValue, toSequenceMethods inherited from interface dev.metaschema.core.metapath.item.atomic.IStringItem
asStringItem, compareTo, encode, length, normalizeSpace
-
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 interfaceIItem- Specified by:
getTypein interfaceIStringItem- Returns:
- the item's type information
-
valueOf
Construct a new item using the provided stringvalue.- Parameters:
value- a string representing a token value- Returns:
- the new item
- Throws:
InvalidTypeMetapathException- if the provided value is not a token
-
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 interfaceIStringItem- Parameters:
item- the item to cast- Returns:
- an atomic item of this type
-