Class NullJavaTypeAdapter.VoidItem

java.lang.Object
dev.metaschema.databind.model.annotations.NullJavaTypeAdapter.VoidItem
All Implemented Interfaces:
IAnyAtomicItem, IAtomicValuedItem, ICollectionValue, IItem
Enclosing class:
NullJavaTypeAdapter

protected static class NullJavaTypeAdapter.VoidItem extends Object implements IAnyAtomicItem
A placeholder atomic item type that throws unsupported operation exceptions for all operations.
  • Constructor Details

    • VoidItem

      protected VoidItem()
  • Method Details

    • getValue

      public Void getValue()
      Description copied from interface: IAnyAtomicItem
      Get the "wrapped" value represented by this item.
      Specified by:
      getValue in interface IAnyAtomicItem
      Specified by:
      getValue in interface IItem
      Returns:
      the value
    • toAtomicItem

      @NonNull public IAnyAtomicItem toAtomicItem()
      Description copied from interface: IItem
      Get the atomic value for the item. This may be the same item if the item is an instance of IAnyAtomicItem.

      An implementation of item atomization.

      Specified by:
      toAtomicItem in interface IAnyAtomicItem
      Specified by:
      toAtomicItem in interface IItem
      Returns:
      the atomic value or null if the item has no available value
    • asString

      @NonNull public String asString()
      Description copied from interface: IAnyAtomicItem
      Get the item's string value.
      Specified by:
      asString in interface IAnyAtomicItem
      Returns:
      the string value value of the item
    • getJavaTypeAdapter

      public IDataTypeAdapter<?> getJavaTypeAdapter()
      Description copied from interface: IAnyAtomicItem
      Get the item's type adapter.
      Specified by:
      getJavaTypeAdapter in interface IAnyAtomicItem
      Returns:
      the type adapter for the item
    • castAsType

      public IAnyAtomicItem 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
    • asMapKey

      public IMapKey asMapKey()
      Description copied from interface: IAnyAtomicItem
      Get the atomic item value as a map key for use with an IMapItem.
      Specified by:
      asMapKey in interface IAnyAtomicItem
      Returns:
      the map key
    • getType

      public IItemType 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
    • toSignature

      public String toSignature()
      Description copied from interface: ICollectionValue
      Get a representation of the value based on its type signature.
      Specified by:
      toSignature in interface ICollectionValue
      Returns:
      the signature
    • deepEquals

      public boolean deepEquals(ICollectionValue other, DynamicContext dynamicContext)
      Description copied from interface: ICollectionValue
      Determine if this and the other value are deeply equal.

      Item equality is defined by the XPath 3.1 fn:deep-equal specification.

      Specified by:
      deepEquals in interface ICollectionValue
      Parameters:
      other - the other value to compare to this value to
      dynamicContext - used to provide evaluation information, including the implicit timezone
      Returns:
      the true if the two values are equal, or false otherwise
    • deepEquals

      public boolean deepEquals(ICollectionValue other)
      Description copied from interface: IAnyAtomicItem
      Determine if this and the other value are deeply equal, without relying on the dynamic context.

      This is used by IMapKey.isSameKey(IMapKey) to determine key equivalence.

      Item equality is defined by the XPath 3.1 fn:deep-equal specification.

      Specified by:
      deepEquals in interface IAnyAtomicItem
      Parameters:
      other - the other value to compare to this value to
      Returns:
      the true if the two values are equal, or false otherwise