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(org.apache.beam.sdk.transforms.SerializableFunction<java.lang.Iterable<V>, V>)
operate on PCollections
of KVs
.
Modifier and Type | Class and Description |
---|---|
static class |
KV.OrderByKey<K extends java.lang.Comparable<? super K>,V>
A
Comparator that orders KVs by the natural ordering of their keys. |
static class |
KV.OrderByValue<K,V extends java.lang.Comparable<? super V>>
A
Comparator that orders KVs by the natural ordering of their values. |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object other) |
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() |