Package io.atomix.utils
Class AbstractIdentifier<T extends Comparable<T>>
java.lang.Object
io.atomix.utils.AbstractIdentifier<T>
- All Implemented Interfaces:
Identifier<T>
Abstract identifier backed by another value, e.g. string, int.
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedConstructor for serialization.protectedAbstractIdentifier(T value) Constructs an identifier backed by the specified value. -
Method Summary
-
Field Details
-
identifier
-
-
Constructor Details
-
AbstractIdentifier
protected AbstractIdentifier()Constructor for serialization. -
AbstractIdentifier
Constructs an identifier backed by the specified value.- Parameters:
value- the backing value
-
-
Method Details
-
id
Returns the backing identifier value.- Specified by:
idin interfaceIdentifier<T extends Comparable<T>>- Returns:
- identifier
-
hashCode
public int hashCode()Returns the hashcode of the identifier. -
equals
Compares two device key identifiers for equality. -
toString
Returns a string representation of a DeviceKeyId.
-