F - type of first valueS - type of second valuepublic class Pair<F,S> extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
Pair.And
Enables the:
first and second syntax for Pair, which is particularly useful with the
Map#mapOf extension method. |
| Modifier and Type | Field and Description |
|---|---|
static Pair.And |
and
and is a "binding" constant that enables clean syntax for creating pairs: |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object o) |
F |
getFirst() |
S |
getSecond() |
int |
hashCode() |
static <T,V> Pair<T,V> |
make(T f,
V s) |
String |
toString() |
public static final Pair.And and
and is a "binding" constant that enables clean syntax for creating pairs: Pair<String,Integer> pair = "Moe" and 88;
Map#mapOf extension method via manifold-collections dependency.Map<String,Integer> map = Map.mapOf("Moe" and 77, "Larry" and 88, "Curly" and 99);Copyright © 2021. All rights reserved.