Package co.elastic.clients.util
Class Pair<K,V>
java.lang.Object
co.elastic.clients.util.Pair<K,V>
public class Pair<K,V>
extends java.lang.Object
A key/value pair. Used to represent pairs where the name is not a string (generally an enum).
The key must have a string representation in JSON.
-
Constructor Summary
-
Method Summary
Modifier and Type Method Description static <K, V> JsonpDeserializer<Pair<K,V>>
deserializer(java.util.function.Function<java.lang.String,K> keyDeserializer, JsonpDeserializer<V> valueDeserializer)
K
key()
static <K, V> Pair<K,V>
of(K name, V value)
V
value()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
Pair
-
-
Method Details
-
key
-
value
-
of
-
deserializer
public static <K, V> JsonpDeserializer<Pair<K,V>> deserializer(java.util.function.Function<java.lang.String,K> keyDeserializer, JsonpDeserializer<V> valueDeserializer)
-