Class AbstractItemType

java.lang.Object
org.rumbledb.types.AbstractItemType
All Implemented Interfaces:
Serializable, ItemType
Direct Known Subclasses:
ArrayItemType, AtomicItemType, AttributeNodeItemType, DerivedAtomicItemType, DocumentNodeItemType, ElementNodeItemType, ErrorItemType, FunctionItemType, ItemItemType, ItemTypeReference, JsonItemType, MapItemType, NodeItemType, ObjectItemType, PINodeItemType, UnionItemType, XmlNodeItemType, XQueryArrayItemType

public abstract class AbstractItemType extends Object implements ItemType
Centralizes Java equality for item types. Named types compare by expanded name, anonymous nominal types compare by identity, and structural types override equalityKey() with a canonical structural key.
See Also:
  • Constructor Details

    • AbstractItemType

      public AbstractItemType()
  • Method Details

    • equals

      public final boolean equals(Object other)
      Description copied from interface: ItemType
      Tests for itemType equality.
      Specified by:
      equals in interface ItemType
      Overrides:
      equals in class Object
      Parameters:
      other - another object.
      Returns:
      true it is equal to other, false otherwise.
    • hashCode

      public final int hashCode()
      Overrides:
      hashCode in class Object
    • equalityKey

      protected Object equalityKey()
    • equalityKeyOf

      protected static Object equalityKeyOf(ItemType itemType)
    • namedTypeKey

      protected static Object namedTypeKey(Name name)
    • structuralTypeKey

      protected static Object structuralTypeKey(Class<? extends ItemType> typeClass, Object... components)