Class BinaryOperatorMap<K,T>
- java.lang.Object
-
- uk.gov.gchq.koryphe.binaryoperator.KorypheBinaryOperator<Map<K,T>>
-
- uk.gov.gchq.koryphe.binaryoperator.BinaryOperatorMap<K,T>
-
- Type Parameters:
K
- Type of keyT
- Input/output type
- All Implemented Interfaces:
BiFunction<Map<K,T>,Map<K,T>,Map<K,T>>
,BinaryOperator<Map<K,T>>
public class BinaryOperatorMap<K,T> extends KorypheBinaryOperator<Map<K,T>>
Applies aBinaryOperator
to the values of an inputMap
, combining values with matching keys.
-
-
Constructor Summary
Constructors Constructor Description BinaryOperatorMap()
Default - for serialisation.BinaryOperatorMap(BinaryOperator<? super T> binaryOperator)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Map<K,T>
_apply(Map<K,T> state, Map<K,T> input)
Iterate through the values of an input map, folding them into the state map using the wrappedBinaryOperator
.BinaryOperator<? super T>
getBinaryOperator()
void
setBinaryOperator(BinaryOperator<? super T> binaryOperator)
-
Methods inherited from class uk.gov.gchq.koryphe.binaryoperator.KorypheBinaryOperator
apply, equals, hashCode
-
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.util.function.BiFunction
andThen
-
-
-
-
Constructor Detail
-
BinaryOperatorMap
public BinaryOperatorMap()
Default - for serialisation.
-
BinaryOperatorMap
public BinaryOperatorMap(BinaryOperator<? super T> binaryOperator)
-
-
Method Detail
-
setBinaryOperator
public void setBinaryOperator(BinaryOperator<? super T> binaryOperator)
-
getBinaryOperator
public BinaryOperator<? super T> getBinaryOperator()
-
-