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

Method main

onjava/CountMap.java:54–66  ·  view source on GitHub ↗
(String[] args)

Source from the content-addressed store, hash-verified

52 .toCollection(LinkedHashSet::new));
53 }
54 public static void main(String[] args) {
55 final int size = 6;
56 CountMap cm = new CountMap(60);
57 System.out.println(cm);
58 System.out.println(cm.get(500));
59 cm.values().stream()
60 .limit(size)
61 .forEach(System.out::println);
62 System.out.println();
63 new Random(47).ints(size, 0, 1000)
64 .mapToObj(cm::get)
65 .forEach(System.out::println);
66 }
67}
68/* Output:
69{0=A0, 1=B0, 2=C0, 3=D0, 4=E0, 5=F0, 6=G0, 7=H0, 8=I0,

Callers

nothing calls this directly

Calls 3

getMethod · 0.95
valuesMethod · 0.80
streamMethod · 0.45

Tested by

no test coverage detected