Package java.util.function

Examples of java.util.function.BiFunction.apply()


    @Override
    public void reduce(final Comparable key, final Iterator<Object> values, final ReduceEmitter<Comparable, Object> emitter) {
        Object mutatingSeed = this.reducer.get().getValue0().get();
        final BiFunction function = this.reducer.get().getValue1();
        while (values.hasNext()) {
            mutatingSeed = function.apply(mutatingSeed, values.next());
        }
        emitter.emit(key, new SimpleTraverser(mutatingSeed, null));
    }

    @Override
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.