Example usage for java.util.function ObjDoubleConsumer accept

List of usage examples for java.util.function ObjDoubleConsumer accept

Introduction

In this page you can find the example usage for java.util.function ObjDoubleConsumer accept.

Prototype

void accept(T t, double value);

Source Link

Document

Performs this operation on the given arguments.

Usage

From source file:Main.java

public static void main(String[] args) {
    ObjDoubleConsumer<String> i = (s, d) -> System.out.println(s + d);

    i.accept("java2s.com ", 0.1234);
}

From source file:org.briljantframework.array.AbstractDoubleArray.java

@Override
public <T> T collect(Supplier<T> supplier, ObjDoubleConsumer<T> consumer) {
    T accumulator = supplier.get();//from   w w  w.  j ava 2s  .  co m
    for (int i = 0; i < size(); i++) {
        consumer.accept(accumulator, get(i));
    }
    return accumulator;
}