- All Superinterfaces:
IAnyAtomicItem,IAtomicValuedItem,ICollectionValue,IItem,IStringItem
An atomic Metapath item containing a UUID data value.
-
Method Summary
Modifier and TypeMethodDescriptionasUuid()Get the "wrapped" UUID value.static IUuidItemcast(IAnyAtomicItem item) Cast the provided type to this item type.default IUuidItemcastAsType(IAnyAtomicItem item) Cast the provideditemto be the same type as this item.default intCompares this value with the argument.default IAtomicOrUnionType<IUuidItem>getType()Get the type information for the item.static IUuidItemrandom()Generate a random UUID value.static IAtomicOrUnionType<IUuidItem>type()Get the type information for this item.static IUuidItemConstruct a new UUID item using the provided stringvalue.static IUuidItemConstruct a new item using the providedvalue.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 UUID item using the provided stringvalue.- Parameters:
value- a string representing a UUID- Returns:
- the new item
- Throws:
InvalidTypeMetapathException- if the given string violates RFC4122
-
valueOf
Construct a new item using the providedvalue.- Parameters:
value- a UUID value- Returns:
- the new item
-
random
Generate a random UUID value.- Returns:
- the generated UUID item
-
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
-
asUuid
Get the "wrapped" UUID value.- Returns:
- the underlying UUID value
-
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
-
compareTo
Compares this value with the argument.- Parameters:
item- the item to compare with this value- Returns:
- a negative integer, zero, or a positive integer if this value is less
than, equal to, or greater than the
item.
-