Java Reference
In-Depth Information
{CD=10, legal pad=5, paper=20, pen=20, pencil=30}
{CD=10, legal pad=5, paper=20, pen=20}
{CD=10, legal pad=5}
{pencil=30, pen=20, paper=20, legal pad=5, CD=10}
NavigableMap
TreeMap
is an example of a navigable map, which is a sorted map that can be
iterated over in descending order as well as ascending order, and which can report
closest matches for given search targets. Navigable maps are described by the
Nav-
igableMap
interface,whosegenerictypeis
NavigableMap<K,V>
,whichextends
SortedMap
, and which is described in
Table 5-11
.