Package co.elastic.clients.util
Class Pair<K,V>
java.lang.Object
co.elastic.clients.util.Pair<K,V>
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 TypeMethodDescriptionstatic <K,
V> JsonpDeserializer<Pair<K, V>> deserializer
(Function<String, K> keyDeserializer, JsonpDeserializer<V> valueDeserializer) key()
static <K,
V> Pair<K, V> of
(K name, V value) value()
-
Constructor Details
-
Pair
-
-
Method Details
-
key
-
value
-
of
-
deserializer
public static <K,V> JsonpDeserializer<Pair<K,V>> deserializer(Function<String, K> keyDeserializer, JsonpDeserializer<V> valueDeserializer)
-