public class Pair<K,V> extends Object implements Tuple, Comparable<Pair<K,V>>, Serializable
Tuple
s.Modifier and Type | Method and Description |
---|---|
int |
compareTo(Pair<K,V> o) |
boolean |
equals(Object obj) |
K |
first() |
Object |
get(int index)
Returns the Object at the given index.
|
int |
hashCode() |
static <T,U> Pair<T,U> |
of(T first,
U second) |
V |
second() |
int |
size()
Returns the number of elements in this Tuple.
|
String |
toString() |
public static <T,U> Pair<T,U> of(T first, U second)
public K first()
public V second()
public Object get(int index)
Tuple
public int size()
Tuple
Copyright © 2016 The Apache Software Foundation. All rights reserved.