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

Method main

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

Source from the content-addressed store, hash-verified

12 NavigableMap<Integer,String> COLORS =
13 new ConcurrentSkipListMap<>(MAP);
14 public static void main(String[] args) {
15 show(COLORS.firstEntry());
16 border();
17 show(COLORS.lastEntry());
18 border();
19 NavigableMap<Integer, String> toLime =
20 COLORS.headMap(rgb("Lime"), true);
21 show(toLime);
22 border();
23 show(COLORS.ceilingEntry(rgb("DeepSkyBlue") - 1));
24 border();
25 show(COLORS.floorEntry(rgb("DeepSkyBlue") - 1));
26 border();
27 show(toLime.descendingMap());
28 border();
29 show(COLORS.tailMap(rgb("MistyRose"), true));
30 border();
31 show(COLORS.subMap(
32 rgb("Orchid"), true,
33 rgb("DarkSalmon"), false));
34 }
35}
36/* Output:
370x000000: Black

Callers

nothing calls this directly

Calls 3

borderMethod · 0.80
rgbMethod · 0.80
showMethod · 0.65

Tested by

no test coverage detected