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 boolean
equals(@Nullable Object obj)
K
first()
Gets the first object, otherwise known as "key".int
hashCode()
static <K,V>
Tuple<K,V>of(K first, V second)
V
second()
Gets the second object, otherwise known as "value".String
toString()
-
-
-
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
-
-