@@ -0,0 +1,1866 @@
+import java.util.Arrays;%0Aimport java.util.HashMap;%0Aimport java.util.List;%0Aimport java.util.Map;%0Aimport java.util.function.ObjLongConsumer;%0A%0Apublic class HelloLambdasObjLongConsumer %7B%0A%09public static void main(String... args) %7B%0A%09%09System.out.println(%22Hello Lambdas ObjLongConsumer!%22);%0A%0A%09%09List%3CLong%3E longs = Arrays.asList(4_000_000_002L, 4_000_000_003L, 4_000_000_004L);%0A%0A%09%09Map%3CString, Long%3E map = new HashMap%3C%3E();%0A%09%09for (Long longVal : longs) %7B%0A%09%09%09map.put(%22val_%22 + longVal, longVal);%0A%09%09%7D%0A%0A%09%09// Simplest - As Lambda Object%0A%09%09ObjLongConsumer%3CString%3E odc1 = (s, x) -%3E System.out.println(s + %22 %22 + x);%0A%09%09odc1.accept(%22abc%22, 4_000_000_123L);%0A%0A%09%09ObjLongConsumer%3CString%3E odc2 = (s, d) -%3E System.out.printf(s, d);%0A%09%09odc2.accept(%22value = %25,d%5Cn%22, 4_000_000_123L);%0A%0A%09%09// ObjLongConsumer Lambda Object Method Reference Inlined%0A%09%09System.out.println(%22---%22);%0A%09%09map.forEach(odc1::accept);%0A%0A%09%09// ObjLongConsumer Lambda Object As a Parameter to a Separate Method%0A%09%09System.out.println(%22---%22);%0A%09%09ObjLongConsumer%3CLong%3E odc3 = (s, i) -%3E System.out.println(%22%22 + s + %22 %22 + i);%0A%09%09printAllPairs(longs, odc3);%0A%0A%09%09// ObjLongConsumer Lambda Object as a Referring Method%0A%09%09ObjLongConsumer%3CMap%3CString, Long%3E%3E objCon = HelloLambdasObjLongConsumer::adder;%0A%09%09System.out.println(%22---%22);%0A%09%09objCon.accept(map, 4_000_000_000L);%0A%09%7D%0A%0A%09static final void printAllPairs(final List%3CLong%3E longs, final ObjLongConsumer%3CLong%3E printer) %7B%0A%09%09Long first = null;%0A%09%09Long previous = null;%0A%09%09for (Long longVal : longs) %7B%0A%09%09%09if (null == first) %7B%0A%09%09%09%09first = longVal;%0A%09%09%09%7D else %7B%0A%09%09%09%09printer.accept(previous, longVal);%0A%09%09%09%7D%0A%09%09%09previous = longVal;%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 final void adder(final Map%3CString, Long%3E map, final long value) %7B%0A%09%09map.forEach((key, val) -%3E System.out.println(String.format(%22%25,d + %25,d = %25,d%22, val, value, (val + value))));%0A%09%7D%0A%7D%0A

Create HelloLambdasObjLongConsumer.java