public class Tuple2<A,B> extends Object implements Map.Entry<A,B>, UnmodMap.UnEntry<A,B>, Serializable
UnmodMap.UnEntry.EntryToUnEntryIter<K,V>, UnmodMap.UnEntry.EntryToUnEntrySortedIter<K,V>, UnmodMap.UnEntry.UnmodKeyIter<K,V>, UnmodMap.UnEntry.UnmodSortedKeyIter<K,V>, UnmodMap.UnEntry.UnmodSortedValIter<K,V>, UnmodMap.UnEntry.UnmodValIter<K,V>
Modifier | Constructor and Description |
---|---|
protected |
Tuple2(A a,
B b)
Constructor is protected (not public) for easy inheritance.
|
Modifier and Type | Method and Description |
---|---|
A |
_1()
Returns the 1st field
|
B |
_2()
Returns the 2nd field
|
boolean |
equals(Object other) |
A |
getKey()
Returns the first field of the tuple.
|
B |
getValue()
Returns the second field of the tuple.
|
int |
hashCode() |
static <A,B> Tuple2<A,B> |
of(A a,
B b)
Public static factory method
|
static <K,V> Tuple2<K,V> |
of(Map.Entry<K,V> entry)
Map.Entry factory method
|
B |
setValue(B value)
Deprecated.
|
String |
toString() |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
entryIterToUnEntrySortedUnIter, entryIterToUnEntryUnIter, entryToUnEntry
comparingByKey, comparingByKey, comparingByValue, comparingByValue
protected Tuple2(A a, B b)
public static <A,B> Tuple2<A,B> of(A a, B b)
public A _1()
public B _2()
public boolean equals(Object other)
public int hashCode()
public A getKey()
public B getValue()
Copyright © 2017. All rights reserved.