Google Cloud Dataflow SDK for Java, version 1.9.1
Class Min.MinFn<T>
- java.lang.Object
-
- com.google.cloud.dataflow.sdk.transforms.Combine.CombineFn<V,Combine.Holder<V>,V>
-
- com.google.cloud.dataflow.sdk.transforms.Combine.BinaryCombineFn<T>
-
- com.google.cloud.dataflow.sdk.transforms.Min.MinFn<T>
-
- Type Parameters:
T
- the type of the values being compared
- All Implemented Interfaces:
- CombineFnBase.GlobalCombineFn<T,Combine.Holder<T>,T>, HasDisplayData, Serializable
- Direct Known Subclasses:
- Min.MinDoubleFn, Min.MinIntegerFn, Min.MinLongFn
- Enclosing class:
- Min
public static class Min.MinFn<T> extends Combine.BinaryCombineFn<T>
ACombineFn
that computes the maximum of a collection of elements of typeT
using an arbitraryComparator
, useful as an argument toCombine.globally(com.google.cloud.dataflow.sdk.transforms.SerializableFunction<java.lang.Iterable<V>, V>)
orCombine.perKey(com.google.cloud.dataflow.sdk.transforms.SerializableFunction<java.lang.Iterable<V>, V>)
.- See Also:
- Serialized Form
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method and Description T
apply(T left, T right)
Applies the binary operation to the two operands, returning the result.TypeVariable<?>
getAccumTVariable()
Returns theTypeVariable
ofAccumT
.String
getIncompatibleGlobalWindowErrorMessage()
Returns the error message for not supported default values in Combine.globally().TypeVariable<?>
getInputTVariable()
Returns theTypeVariable
ofInputT
.TypeVariable<?>
getOutputTVariable()
Returns theTypeVariable
ofOutputT
.T
identity()
Returns the value that should be used for the combine of the empty set.static <T extends Comparable<? super T>>
Min.MinFn<T>naturalOrder()
static <T extends Comparable<? super T>>
Min.MinFn<T>naturalOrder(T identity)
static <T,ComparatorT extends Comparator<? super T> & Serializable>
Min.MinFn<T>of(ComparatorT comparator)
static <T,ComparatorT extends Comparator<? super T> & Serializable>
Min.MinFn<T>of(T identity, ComparatorT comparator)
void
populateDisplayData(DisplayData.Builder builder)
Register display data for the given transform or component.-
Methods inherited from class com.google.cloud.dataflow.sdk.transforms.Combine.BinaryCombineFn
addInput, createAccumulator, extractOutput, getAccumulatorCoder, getDefaultOutputCoder, mergeAccumulators
-
Methods inherited from class com.google.cloud.dataflow.sdk.transforms.Combine.CombineFn
apply, asKeyedFn, compact, defaultValue, getOutputType
-
-
-
-
Method Detail
-
of
public static <T,ComparatorT extends Comparator<? super T> & Serializable> Min.MinFn<T> of(T identity, ComparatorT comparator)
-
of
public static <T,ComparatorT extends Comparator<? super T> & Serializable> Min.MinFn<T> of(ComparatorT comparator)
-
naturalOrder
public static <T extends Comparable<? super T>> Min.MinFn<T> naturalOrder(T identity)
-
naturalOrder
public static <T extends Comparable<? super T>> Min.MinFn<T> naturalOrder()
-
identity
public T identity()
Description copied from class:Combine.BinaryCombineFn
Returns the value that should be used for the combine of the empty set.- Overrides:
identity
in classCombine.BinaryCombineFn<T>
-
apply
public T apply(T left, T right)
Description copied from class:Combine.BinaryCombineFn
Applies the binary operation to the two operands, returning the result.- Specified by:
apply
in classCombine.BinaryCombineFn<T>
-
populateDisplayData
public void populateDisplayData(DisplayData.Builder builder)
Register display data for the given transform or component.populateDisplayData(DisplayData.Builder)
is invoked by Pipeline runners to collect display data viaDisplayData.from(HasDisplayData)
. Implementations may callsuper.populateDisplayData(builder)
in order to register display data in the current namespace, but should otherwise usesubcomponent.populateDisplayData(builder)
to use the namespace of the subcomponent.By default, does not register any display data. Implementors may override this method to provide their own display data.
- Specified by:
populateDisplayData
in interfaceHasDisplayData
- Parameters:
builder
- The builder to populate with display data.- See Also:
HasDisplayData
-
getIncompatibleGlobalWindowErrorMessage
public String getIncompatibleGlobalWindowErrorMessage()
Description copied from interface:CombineFnBase.GlobalCombineFn
Returns the error message for not supported default values in Combine.globally().- Specified by:
getIncompatibleGlobalWindowErrorMessage
in interfaceCombineFnBase.GlobalCombineFn<InputT,AccumT,OutputT>
-
getInputTVariable
public TypeVariable<?> getInputTVariable()
Returns theTypeVariable
ofInputT
.
-
getAccumTVariable
public TypeVariable<?> getAccumTVariable()
Returns theTypeVariable
ofAccumT
.
-
getOutputTVariable
public TypeVariable<?> getOutputTVariable()
Returns theTypeVariable
ofOutputT
.
-
-