public class Pair<A,B>
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
Pair.NonNull<A,B> |
Modifier and Type | Method and Description |
---|---|
static <A,B> Pair<A,B> |
create(A first,
B second) |
static <A,B> Function<A,Pair<A,B>> |
createFunction(B value) |
static <A,B> Pair.NonNull<A,B> |
createNonNull(A first,
B second) |
static <A,B> Pair<A,B> |
empty() |
boolean |
equals(java.lang.Object o) |
A |
getFirst() |
static <T> T |
getFirst(Pair<T,?> pair) |
B |
getSecond() |
static <T> T |
getSecond(Pair<?,T> pair) |
int |
hashCode() |
static <A,B> Pair<A,B> |
pair(A first,
B second) |
java.lang.String |
toString() |
public Pair(A first, B second)
create(Object, Object)
public static <A,B> Pair<A,B> create(A first, B second)
public static <A,B> Pair.NonNull<A,B> createNonNull(A first, B second)
public static <A,B> Pair<A,B> pair(A first, B second)
public static <T> T getFirst(Pair<T,?> pair)
public static <T> T getSecond(Pair<?,T> pair)
public static <A,B> Pair<A,B> empty()
public final A getFirst()
public final B getSecond()
public final boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object