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 intcompareTo(PartitionAttributes.Key o)booleanequals(java.lang.Object o)inthashCode()static <T> PartitionAttributes.Key<T>newKey()Create a new instance.static <T> PartitionAttributes.Key<T>newKey(java.lang.String toString)Create a newPartitionAttributes.Keywhich has aStringused only in thetoString()method for debugging visibility.java.lang.StringtoString()
-
-
-
Method Detail
-
newKey
public static <T> PartitionAttributes.Key<T> newKey(java.lang.String toString)
Create a newPartitionAttributes.Keywhich has aStringused only in thetoString()method for debugging visibility.Comparison between
PartitionAttributes.Keyobjects 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.Keyobjects.- Returns:
- a new
PartitionAttributes.Keywhich has aStringused only in thetoString()method for debugging visibility.
-
newKey
public static <T> PartitionAttributes.Key<T> newKey()
Create a new instance.Comparison between
PartitionAttributes.Keyobjects 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:
toStringin classjava.lang.Object
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
compareTo
public int compareTo(PartitionAttributes.Key o)
- Specified by:
compareToin interfacejava.lang.Comparable<T>
-
-