Class PartitionAttributes.Key<T>
- java.lang.Object
-
- io.servicetalk.client.api.partition.PartitionAttributes.Key<T>
-
- Type Parameters:
T
- The type of value associated with aPartitionAttributes.Key
.
- All Implemented Interfaces:
java.lang.Comparable<PartitionAttributes.Key>
- Enclosing interface:
- PartitionAttributes
public static final class PartitionAttributes.Key<T> extends java.lang.Object implements java.lang.Comparable<PartitionAttributes.Key>
A key identifies a specific object in aPartitionAttributes
.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compareTo(PartitionAttributes.Key o)
boolean
equals(java.lang.Object o)
int
hashCode()
static <T> PartitionAttributes.Key<T>
newKey()
Create a new instance.static <T> PartitionAttributes.Key<T>
newKey(java.lang.String toString)
Create a newPartitionAttributes.Key
which has aString
used only in thetoString()
method for debugging visibility.java.lang.String
toString()
-
-
-
Method Detail
-
newKey
public static <T> PartitionAttributes.Key<T> newKey(java.lang.String toString)
Create a newPartitionAttributes.Key
which has aString
used only in thetoString()
method for debugging visibility.Comparison between
PartitionAttributes.Key
objects should be assumed to be on an instance basis. In generalnewKey(str) != newKey(str)
.- Type Parameters:
T
- The value type associated with thePartitionAttributes.Key
.- Parameters:
toString
- The value to use intoString()
. This WILL NOT be used in comparisons betweenPartitionAttributes.Key
objects.- Returns:
- a new
PartitionAttributes.Key
which has aString
used only in thetoString()
method for debugging visibility.
-
newKey
public static <T> PartitionAttributes.Key<T> newKey()
Create a new instance.Comparison between
PartitionAttributes.Key
objects should be assumed to be on an instance basis. In generalnewKey() != newKey()
.- Type Parameters:
T
- The value type associated with thePartitionAttributes.Key
.- Returns:
- a new instance.
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
compareTo
public int compareTo(PartitionAttributes.Key o)
- Specified by:
compareTo
in interfacejava.lang.Comparable<T>
-
-