F - the type of the first objectS - the type of the second objectpublic final class Pair<F,S>
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
F |
first()
Gets the first object.
|
static <K,V> java.util.stream.Collector<Pair<? extends K,? extends V>,?,java.util.Map<K,V>> |
mapCollector()
Creates a new pair collector.
|
static <F,S> Pair<F,S> |
of(F first,
S second)
Creates a new pair.
|
S |
second()
Gets the second object.
|
java.lang.String |
toString() |
public static <F,S> Pair<F,S> of(F first, S second)
first - the first objectsecond - the second objectpublic static <K,V> java.util.stream.Collector<Pair<? extends K,? extends V>,?,java.util.Map<K,V>> mapCollector()
K - the type of the keyV - the type of the valuepublic F first()
public S second()
public java.lang.String toString()
toString in class java.lang.Object