Google Cloud Dataflow SDK for Java, version 1.9.1
com.google.cloud.dataflow.sdk.values
Class KV<K,V>
- java.lang.Object
-
- com.google.cloud.dataflow.sdk.values.KV<K,V>
-
- Type Parameters:
K
- the type of the keyV
- the type of the value
- All Implemented Interfaces:
- Serializable
public class KV<K,V> extends Object implements Serializable
An immutable key/value pair.Various
PTransforms
likeGroupByKey
andCombine.perKey(com.google.cloud.dataflow.sdk.transforms.SerializableFunction<java.lang.Iterable<V>, V>)
operate onPCollections
ofKVs
.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class and Description static class
KV.OrderByKey<K extends Comparable<? super K>,V>
AComparator
that ordersKVs
by the natural ordering of their keys.static class
KV.OrderByValue<K,V extends Comparable<? super V>>
AComparator
that ordersKVs
by the natural ordering of their values.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method and Description boolean
equals(Object other)
K
getKey()
Returns the key of thisKV
.V
getValue()
Returns the value of thisKV
.int
hashCode()
static <K,V> KV<K,V>
of(K key, V value)
Returns aKV
with the given key and value.String
toString()
-