@@ -0,0 +1,1834 @@
+import java.util.Arrays;%0Aimport java.util.HashMap;%0Aimport java.util.List;%0Aimport java.util.Map;%0Aimport java.util.function.ObjDoubleConsumer;%0A%0Apublic class HelloLambdasObjDoubleConsumer %7B%0A%09public static void main(String... args) %7B%0A%09%09System.out.println(%22Hello Lambdas ObjDoubleConsumer!%22);%0A%0A%09%09List%3CDouble%3E doubles = Arrays.asList(2.0d, 3.0d, 4.0d);%0A%0A%09%09Map%3CString, Double%3E map = new HashMap%3C%3E();%0A%09%09for (Double dbl : doubles) %7B%0A%09%09%09map.put(%22val_%22 + dbl, dbl);%0A%09%09%7D%0A%0A%09%09// Simplest - As Lambda Object%0A%09%09ObjDoubleConsumer%3CString%3E odc1 = (s, d) -%3E System.out.println(s + %22 %22 + d);%0A%09%09odc1.accept(%22abc%22, 123d);%0A%0A%09%09ObjDoubleConsumer%3CString%3E odc2 = (s, d) -%3E System.out.printf(s, d);%0A%09%09odc2.accept(%22value = %25s%5Cn%22, 123d);%0A%0A%09%09// ObjDoubleConsumer Lambda Object Method Reference Inlined%0A%09%09System.out.println(%22---%22);%0A%09%09map.forEach(odc1::accept);%0A%0A%09%09// ObjDoubleConsumer Lambda Object As a Parameter to a Separate Method%0A%09%09System.out.println(%22---%22);%0A%09%09ObjDoubleConsumer%3CDouble%3E odc3 = (s, d) -%3E System.out.println(%22%22 + s + %22 %22 + d);%0A%09%09printAllPairs(doubles, odc3);%0A%0A%09%09// ObjDoubleConsumer Lambda Object as a Referring Method%0A%09%09ObjDoubleConsumer%3CMap%3CString, Double%3E%3E objCon = HelloLambdasObjDoubleConsumer::adder;%0A%09%09System.out.println(%22---%22);%0A%09%09objCon.accept(map, 2.0d);%0A%09%7D%0A%0A%09static void printAllPairs(final List%3CDouble%3E doubles, final ObjDoubleConsumer%3CDouble%3E printer) %7B%0A%09%09Double first = null;%0A%09%09Double previous = null;%0A%09%09for (Double dbl : doubles) %7B%0A%09%09%09if (null == first) %7B%0A%09%09%09%09first = dbl;%0A%09%09%09%7D else %7B%0A%09%09%09%09printer.accept(previous, dbl);%0A%09%09%09%7D%0A%09%09%09previous = dbl;%0A%09%09%7D%0A%09%09if (null != previous && null != first) %7B%0A%09%09%09printer.accept(previous, first);%0A%09%09%7D%0A%09%7D%0A%0A%09static void adder(final Map%3CString, Double%3E map, final double value) %7B%0A%09%09map.forEach(%0A%09%09%09%09(key, val) -%3E System.out.println(String.format(%22%253.1f + %253.1f = %253.1f%22, val, value, (val + value))));%0A%09%7D%0A%7D%0A

Create HelloLambdasObjDoubleConsumer.java