K - the type of the keyV - the type of the valuepublic class KV<K,V>
extends java.lang.Object
implements java.io.Serializable
Various
PTransforms like
GroupByKey and
Combine.perKey(com.google.cloud.dataflow.sdk.transforms.SerializableFunction<java.lang.Iterable<V>, V>)
work on PCollections of KVs.
| Modifier and Type | Class and Description |
|---|---|
static class |
KV.OrderByKey<K extends java.lang.Comparable<? super K>,V>
Orders the KV by the key.
|
static class |
KV.OrderByValue<K,V extends java.lang.Comparable<? super V>>
Orders the KV by the value.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object o) |
K |
getKey()
Returns the key of this KV.
|
V |
getValue()
Returns the value of this KV.
|
int |
hashCode() |
static <K,V> KV<K,V> |
of(K key,
V value)
Returns a KV with the given key and value.
|
java.lang.String |
toString() |
public static <K,V> KV<K,V> of(K key, V value)
public K getKey()
public V getValue()
public boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Object