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

Method test

streams/OptionalFlatMap.java:14–24  ·  view source on GitHub ↗
(String descr,
    Function<String, Optional<String>> func)

Source from the content-addressed store, hash-verified

12 return Arrays.stream(elements);
13 }
14 static void test(String descr,
15 Function<String, Optional<String>> func) {
16 System.out.println(" ---( " + descr + " )---");
17 for(int i = 0; i <= elements.length; i++) {
18 System.out.println(
19 testStream()
20 .skip(i)
21 .findFirst()
22 .flatMap(func));
23 }
24 }
25 public static void main(String[] args) {
26
27 test("Add brackets",

Callers 1

mainMethod · 0.95

Calls 1

testStreamMethod · 0.95

Tested by

no test coverage detected