Class IntMinimum
- java.lang.Object
-
- org.apache.flink.api.common.accumulators.IntMinimum
-
- All Implemented Interfaces:
Serializable,Cloneable,Accumulator<Integer,Integer>,SimpleAccumulator<Integer>
@PublicEvolving public class IntMinimum extends Object implements SimpleAccumulator<Integer>
An accumulator that finds the minimumintegervalue.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description IntMinimum()IntMinimum(int value)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd(int value)voidadd(Integer value)Consider usingadd(int)instead for primitive integer valuesIntMinimumclone()Duplicates the accumulator.IntegergetLocalValue()intgetLocalValuePrimitive()voidmerge(Accumulator<Integer,Integer> other)Used by system internally to merge the collected parts of an accumulator at the end of the job.voidresetLocal()Reset the local value.StringtoString()
-
-
-
Method Detail
-
add
public void add(Integer value)
Consider usingadd(int)instead for primitive integer values- Specified by:
addin interfaceAccumulator<Integer,Integer>- Parameters:
value- The value to add to the accumulator object
-
getLocalValue
public Integer getLocalValue()
- Specified by:
getLocalValuein interfaceAccumulator<Integer,Integer>- Returns:
- local The local value from the current UDF context
-
merge
public void merge(Accumulator<Integer,Integer> other)
Description copied from interface:AccumulatorUsed by system internally to merge the collected parts of an accumulator at the end of the job.- Specified by:
mergein interfaceAccumulator<Integer,Integer>- Parameters:
other- Reference to accumulator to merge in.
-
resetLocal
public void resetLocal()
Description copied from interface:AccumulatorReset the local value. This only affects the current UDF context.- Specified by:
resetLocalin interfaceAccumulator<Integer,Integer>
-
clone
public IntMinimum clone()
Description copied from interface:AccumulatorDuplicates the accumulator. All subclasses need to properly implement cloning and cannot throw aCloneNotSupportedException
-
add
public void add(int value)
-
getLocalValuePrimitive
public int getLocalValuePrimitive()
-
-