
上QQ阅读APP看书,第一时间看更新
SortedMap
SortedMap is similar to SortedSet. It has a two implementations, a mutable and immutable TreeMap, and provides a few methods defined in terms of SortedOps such as:
- Subcollection retrieval: iteratorFrom, keysIteratorFrom, valuesIteratorFrom, and rangeTo give us a way to get elements of the map as an iterator.
- Element retrieval: firstKey, lastKey, minAfter, and maxBefore allow us to retrieve an element that satisfies some ordering condition.