Interface IHexBinaryItem

All Superinterfaces:
IAnyAtomicItem, IAtomicValuedItem, dev.metaschema.core.metapath.item.atomic.impl.IBinaryItem, ICollectionValue, IItem

public interface IHexBinaryItem extends dev.metaschema.core.metapath.item.atomic.impl.IBinaryItem
An atomic Metapath item containing a Base64 encoded data value.
  • Method Details

    • type

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

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

      @NonNull static IHexBinaryItem valueOf(@NonNull String value)
      Construct a new base64 byte sequence item using the provided base64 encoded string value.
      Parameters:
      value - a string representing base64 encoded data
      Returns:
      the new item
      Throws:
      InvalidTypeMetapathException - if the provided string is not a valid Base64 character sequence
    • valueOf

      @NonNull static IHexBinaryItem valueOf(@NonNull ByteBuffer buffer)
      Construct a new URI base64 encoded byte sequence using the provided ByteBuffer value.

      The provided buffer will be managed by this instance. Make a copy of the buffer to ensure that the position, limit, and mark of the original are not affect by this.

      Parameters:
      buffer - a byte buffer
      Returns:
      the new item
    • cast

      @NonNull static IHexBinaryItem 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
    • castAsType

      default IHexBinaryItem 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
      Parameters:
      item - the item to cast
      Returns:
      an atomic item of this type
    • compareTo

      default int compareTo(@NonNull IHexBinaryItem 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.