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

Method test

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

Source from the content-addressed store, hash-verified

12 return Arrays.stream(elements);
13 }
14 static void
15 test(String descr, Function<String, 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() // Produces an Optional
22 .map(func));
23 }
24 }
25 public static void main(String[] args) {
26
27 // If Optional is not empty, map() first extracts

Callers 1

mainMethod · 0.95

Calls 1

testStreamMethod · 0.95

Tested by

no test coverage detected