public class Pair<K,V>
extends java.lang.Object
implements java.io.Serializable
| Constructor and Description |
|---|
Pair() |
| Modifier and Type | Method and Description |
|---|---|
static <T,E> Pair<T,E> |
create(T key,
E value) |
static <T> Pair<T,T> |
fromArray(T[] arr) |
K |
getFirst() |
K |
getLeft() |
V |
getRight() |
V |
getSecond() |
static <T,E> Pair<T,E> |
makePair(T key,
E value) |
static <T,E> Pair<T,E> |
of(T key,
E value) |
static <T,E> Pair<T,E> |
pairOf(T key,
E value) |
void |
setFirst(K first) |
void |
setSecond(V second) |
java.lang.String |
toString() |
public java.lang.String toString()
toString in class java.lang.Objectpublic K getLeft()
public V getRight()
public K getFirst()
public V getSecond()
public void setFirst(K first)
public void setSecond(V second)
public static <T,E> Pair<T,E> of(T key, E value)
public static <T,E> Pair<T,E> makePair(T key, E value)
public static <T,E> Pair<T,E> create(T key, E value)
public static <T,E> Pair<T,E> pairOf(T key, E value)
public static <T> Pair<T,T> fromArray(T[] arr)
Copyright © 2019. All rights reserved.