U - first datatypeV - second datatypepublic class Pair<U,V> extends Object
| Constructor and Description |
|---|
Pair(U left,
V right)
Creates an immutable pair of two objects of type U & V.
|
| Modifier and Type | Method and Description |
|---|---|
U |
getLeft()
Retrieve the left part of the pair object.
|
V |
getRight()
Retrieve the rightpart of the pair object.
|
static <U,V> Pair<U,V> |
of(U left,
V right)
Method factory of a pair.
|
public U getLeft()
public V getRight()
public static <U,V> Pair<U,V> of(U left, V right)
U - the type of the left valueV - the type of the right valueleft - the left valueright - the right valueCopyright © 2016–2021 Matthieu Brouillard. All rights reserved.