Class AbstractAtomicItemBase<TYPE>

java.lang.Object
dev.metaschema.core.metapath.item.atomic.AbstractAtomicItemBase<TYPE>
Type Parameters:
TYPE - the Java type of the underlying data value
All Implemented Interfaces:
IAnyAtomicItem, IAtomicValuedItem, ICollectionValue, IItem
Direct Known Subclasses:
AbstractAnyAtomicItem

public abstract class AbstractAtomicItemBase<TYPE> extends Object implements IAnyAtomicItem
Provides base functionality for atomic item implementations.
  • Constructor Details

    • AbstractAtomicItemBase

      public AbstractAtomicItemBase()
  • Method Details

    • getJavaTypeAdapter

      @NonNull public abstract IDataTypeAdapter<TYPE> 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
    • asString

      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
    • 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
    • getValueSignature

      @NonNull protected abstract String getValueSignature()
      Get the string to use for the item's value in the item's signature.
      Returns:
      the value string
    • toString

      @NonNull public String toString()
      Overrides:
      toString in class Object
    • 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(@Nullable ICollectionValue other)
      Determine if this and the other value are deeply equal, without relying on the dynamic context.

      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