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 Object
A tuple of objects.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(@Nullable 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".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
-
-