F - type of first valueS - type of second valuepublic class Pair<F,S>
extends java.lang.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(java.lang.Object o) |
F |
getFirst() |
S |
getSecond() |
int |
hashCode() |
static <T,V> Pair<T,V> |
make(T f,
V s) |
java.lang.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);public F getFirst()
public S getSecond()
public static <T,V> Pair<T,V> make(T f, V s)
public boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.ObjectCopyright © 2023. All rights reserved.