N - the type of the Numbers being comparedpublic static class Min.MinFn<N extends java.lang.Comparable<N>> extends Combine.BinaryCombineFn<N>
CombineFn that computes the minimum of a collection
of elements of type N, useful as an
argument to Combine.globally(com.google.cloud.dataflow.sdk.transforms.SerializableFunction<java.lang.Iterable<V>, V>) or Combine.perKey(com.google.cloud.dataflow.sdk.transforms.SerializableFunction<java.lang.Iterable<V>, V>).| Constructor and Description |
|---|
Min.MinFn(N initialValue)
Constructs a combining function that computes the minimum over
a collection of values of type
N, given the largest
value of type N, which is the identity value for the
minimum operation over Ns. |
| Modifier and Type | Method and Description |
|---|---|
N |
apply(N a,
N b)
Applies the binary operation to the two operands, returning the result.
|
N |
identity()
Returns the value that should be used for the combine of the empty set.
|
addInput, createAccumulator, extractOutput, getAccumulatorCoder, getDefaultOutputCoder, mergeAccumulatorsapply, asKeyedFnpublic Min.MinFn(N initialValue)
N, given the largest
value of type N, which is the identity value for the
minimum operation over Ns.public N apply(N a, N b)
Combine.BinaryCombineFnapply in class Combine.BinaryCombineFn<N extends java.lang.Comparable<N>>public N identity()
Combine.BinaryCombineFnidentity in class Combine.BinaryCombineFn<N extends java.lang.Comparable<N>>