All Downloads are FREE. Search and download functionalities are using the official Maven repository.

functionalj.stream.DoubleStreamProcessor Maven / Gradle / Ivy

There is a newer version: 1.0.17
Show newest version
package functionalj.stream;

import java.util.function.ToDoubleFunction;

import lombok.val;

public interface DoubleStreamProcessor {
    
    public TARGET process(DoubleStreamPlus stream);
    
    default  StreamProcessor of(ToDoubleFunction mapper) {
        return new StreamProcessor() {
            @Override
            public TARGET process(StreamPlus stream) {
                val dataStream = stream.mapToDouble(mapper);
                val target     = DoubleStreamProcessor.this.process(dataStream);
                return target;
            }
        };
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy