public final class ScalaFoldFunction<T,R> extends Object implements FoldFunction<T,R>
FoldFunction
.Constructor and Description |
---|
ScalaFoldFunction(scala.Function2<R,T,R> foldFunction) |
Modifier and Type | Method and Description |
---|---|
R |
fold(R accumulator,
T value)
The core method of FoldFunction, combining two values into one value of the same type.
|
public R fold(R accumulator, T value)
FoldFunction
fold
in interface FoldFunction<T,R>
accumulator
- The initial value, and accumulator.value
- The value from the group to "fold" into the accumulator.Copyright © 2014–2017 The Apache Software Foundation. All rights reserved.