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

Method main

collectiontopics/SetOrder.java:21–34  ·  view source on GitHub ↗
(String[] args)

Source from the content-addressed store, hash-verified

19 Collections.reverse(RLIST);
20 }
21 public static void
22 main(String[] args) throws Exception {
23 for(String type: sets) {
24 System.out.format("[-> %s <-]%n",
25 type.substring(type.lastIndexOf('.') + 1));
26 @SuppressWarnings("unchecked")
27 Set<String> set = (Set<String>)
28 Class.forName(type).getConstructor().newInstance();
29 set.addAll(RLIST);
30 set.stream()
31 .limit(10)
32 .forEach(System.out::println);
33 }
34 }
35}
36/* Output:
37[-> HashSet <-]

Callers

nothing calls this directly

Calls 4

newInstanceMethod · 0.80
addAllMethod · 0.80
formatMethod · 0.45
streamMethod · 0.45

Tested by

no test coverage detected