Package manifold.rt.api.util
Class Pair<F,S>
- java.lang.Object
-
- manifold.rt.api.util.Pair<F,S>
-
- Type Parameters:
F- type of first valueS- type of second value
public class Pair<F,S> extends Object
A simple class to type-safely model a pair of values.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object o)FgetFirst()SgetSecond()inthashCode()static <T,V>
Pair<T,V>make(T f, V s)StringtoString()
-
-
-
Field Detail
-
and
public static final Pair.And and
andis a "binding" constant that enables clean syntax for creating pairs:
Pair<String,Integer> pair = "Moe" and 88;
Use withMap#mapOfextension method viamanifold-collectionsdependency.
Map<String,Integer> map = Map.mapOf("Moe" and 77, "Larry" and 88, "Curly" and 99);
-
-