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

Method main

streams/Optionals.java:40–46  ·  view source on GitHub ↗
(String[] args)

Source from the content-addressed store, hash-verified

38 cos.accept(Stream.<String>empty().findFirst());
39 }
40 public static void main(String[] args) {
41 test("basics", Optionals::basics);
42 test("ifPresent", Optionals::ifPresent);
43 test("orElse", Optionals::orElse);
44 test("orElseGet", Optionals::orElseGet);
45 test("orElseThrow", Optionals::orElseThrow);
46 }
47}
48/* Output:
49 === basics ===

Callers

nothing calls this directly

Calls 1

testMethod · 0.95

Tested by

no test coverage detected