Class AbstractId<T extends AbstractId<T>>

java.lang.Object
org.apache.accumulo.core.data.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.
Since:
2.0.0
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.
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

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

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