Package top.focess.qq.api.util
Class Pair<K,V>
- java.lang.Object
-
- top.focess.qq.api.util.Pair<K,V>
-
- Type Parameters:
K- the type of first element of the PairV- the type of second element of the Pair
- All Implemented Interfaces:
Serializable
public class Pair<K,V> extends Object implements Serializable
This is an Easy Util Class to store two Instances.- See Also:
- Serialized Form
-
-
Method Detail
-
of
public static <K,V> Pair<K,V> of(K key, V value)
Constructs a new Pair with static method- Type Parameters:
K- the first element typeV- the second element type- Parameters:
key- the first elementvalue- the second element- Returns:
- the pair
-
getKey
public K getKey()
-
getValue
public V getValue()
-
getLeft
public K getLeft()
-
getRight
public V getRight()
-
getFirst
public K getFirst()
-
getSecond
public V getSecond()
-
-