Interface IUuidItem

All Superinterfaces:
IAnyAtomicItem, IAtomicValuedItem, ICollectionValue, IItem, IStringItem

public interface IUuidItem extends IStringItem
An atomic Metapath item containing a UUID data value.
  • Method Details

    • type

      @NonNull static IAtomicOrUnionType<IUuidItem> type()
      Get the type information for this item.
      Returns:
      the type information
    • getType

      default IAtomicOrUnionType<IUuidItem> getType()
      Description copied from interface: IItem
      Get the type information for the item.
      Specified by:
      getType in interface IItem
      Specified by:
      getType in interface IStringItem
      Returns:
      the item's type information
    • valueOf

      @NonNull static IUuidItem valueOf(@NonNull String value)
      Construct a new UUID item using the provided string value.
      Parameters:
      value - a string representing a UUID
      Returns:
      the new item
      Throws:
      InvalidTypeMetapathException - if the given string violates RFC4122
    • valueOf

      @NonNull static IUuidItem valueOf(@NonNull UUID value)
      Construct a new item using the provided value.
      Parameters:
      value - a UUID value
      Returns:
      the new item
    • random

      @NonNull static IUuidItem random()
      Generate a random UUID value.
      Returns:
      the generated UUID item
    • cast

      @NonNull static IUuidItem cast(@NonNull IAnyAtomicItem item)
      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 provided item cannot be cast to this type
    • asUuid

      @NonNull UUID asUuid()
      Get the "wrapped" UUID value.
      Returns:
      the underlying UUID value
    • castAsType

      default IUuidItem castAsType(IAnyAtomicItem item)
      Description copied from interface: IAnyAtomicItem
      Cast the provided item to be the same type as this item.
      Specified by:
      castAsType in interface IAnyAtomicItem
      Specified by:
      castAsType in interface IStringItem
      Parameters:
      item - the item to cast
      Returns:
      an atomic item of this type
    • compareTo

      default int compareTo(@NonNull IUuidItem item)
      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.