Class AbstractId<T extends AbstractId<T>>

All Implemented Interfaces:
Serializable, Comparable<T>
Direct Known Subclasses:
CompactionExecutorId, CompactionServiceId, InstanceId, NamespaceId, TableId

public abstract class AbstractId<T extends AbstractId<T>> extends Object implements Comparable<T>, Serializable
An abstract identifier class for comparing equality of identifiers of the same type.
See Also:
  • Constructor Details

    • AbstractId

      protected AbstractId(String canonical)
  • Method Details

    • canonical

      public final String canonical()
      The canonical ID. This is guaranteed to be non-null.
    • equals

      public boolean equals(Object obj)
      AbstractID objects are considered equal if, and only if, they are of the same type and have the same canonical identifier.
      equals in class Object
    • hashCode

      public int hashCode()
      hashCode in class Object
    • toString

      public final String toString()
      Returns a string of the canonical ID. This is guaranteed to be non-null.
      toString in class Object
    • compareTo

      public int compareTo(T other)
      Specified by:
      compareTo in interface Comparable<T extends AbstractId<T>>