| 9 | |
| 10 | // Fast Binary Encoding pair wrapper |
| 11 | public final class Pair<K, V> |
| 12 | { |
| 13 | private final K key; |
| 14 | private final V value; |
| 15 | |
| 16 | // Initialize the pair with given key and value |
| 17 | public Pair(K key, V value) |
| 18 | { |
| 19 | this.key = key; |
| 20 | this.value = value; |
| 21 | } |
| 22 | |
| 23 | // Get the pair key |
| 24 | public K getKey() { return key; } |
| 25 | // Get the pair value |
| 26 | public V getValue() { return value; } |
| 27 | |
| 28 | // Create a new pair |
| 29 | public static <K, V> Pair<K, V> create(K key, V value) { return new Pair<K, V>(key, value); } |
| 30 | } |