MCPcopy Index your code
hub / github.com/BruceEckel/OnJava8-Examples / main

Method main

functional/ClassFunctionals.java:23–44  ·  view source on GitHub ↗
(String[] args)

Source from the content-addressed store, hash-verified

21 static AA f9(AA aa) { return new AA(); }
22 static AA f10(AA aa1, AA aa2) { return new AA(); }
23 public static void main(String[] args) {
24 Supplier<AA> s = ClassFunctionals::f1;
25 s.get();
26 Comparator<AA> c = ClassFunctionals::f2;
27 c.compare(new AA(), new AA());
28 Consumer<AA> cons = ClassFunctionals::f3;
29 cons.accept(new AA());
30 BiConsumer<AA,BB> bicons = ClassFunctionals::f4;
31 bicons.accept(new AA(), new BB());
32 Function<AA,CC> f = ClassFunctionals::f5;
33 CC cc = f.apply(new AA());
34 BiFunction<AA,BB,CC> bif = ClassFunctionals::f6;
35 cc = bif.apply(new AA(), new BB());
36 Predicate<AA> p = ClassFunctionals::f7;
37 boolean result = p.test(new AA());
38 BiPredicate<AA,BB> bip = ClassFunctionals::f8;
39 result = bip.test(new AA(), new BB());
40 UnaryOperator<AA> uo = ClassFunctionals::f9;
41 AA aa = uo.apply(new AA());
42 BinaryOperator<AA> bo = ClassFunctionals::f10;
43 aa = bo.apply(new AA(), new AA());
44 }
45}

Callers

nothing calls this directly

Calls 5

getMethod · 0.65
acceptMethod · 0.65
applyMethod · 0.65
testMethod · 0.65
compareMethod · 0.45

Tested by

no test coverage detected