Package org.spongepowered.api.util
Class Tuple<K,V>
- java.lang.Object
-
- org.spongepowered.api.util.Tuple<K,V>
-
- Type Parameters:
K- The keyV- The value
public class Tuple<K,V> extends java.lang.ObjectA tuple of objects.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(@Nullable java.lang.Object obj)Kfirst()Gets the first object, otherwise known as "key".inthashCode()static <K,V>
Tuple<K,V>of(K first, V second)Vsecond()Gets the second object, otherwise known as "value".java.lang.StringtoString()
-
-
-
Method Detail
-
of
public static <K,V> Tuple<K,V> of(K first, V second)
- Type Parameters:
K- The type of first objectV- The type of second object- Parameters:
first- The first objectsecond- The second object- Returns:
- The new Tuple
-
first
public K first()
Gets the first object, otherwise known as "key".- Returns:
- The first object
-
second
public V second()
Gets the second object, otherwise known as "value".- Returns:
- The value
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(@Nullable java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
-