Package java.util
Interface SortedMap

Public Method subMap

abstract SortedMap subMap(Object fromKey, Object toKey)

_INSERT_METHOD_SIGNATURE_HERE_

Description:

Returns a view of the portion of this sorted map whose keys range from fromKey, inclusive, to toKey, exclusive. If fromKey and toKey are equal, the returned sorted map is empty. The returned sorted map is backed by this sorted map, so changes in the returned sorted map are reflected in this sorted map, and vice-versa. The returned Map supports all optional map operations that this sorted map supports.

The map returned by this method will throw an IllegalArgumentException if the user attempts to insert a key outside the specified range.

This method always returns a half-open range (which includes its low endpoint but not its high endpoint). If you need a closed range (which includes both endpoints), and the key type allows for calculation of the successor a given key, merely request the subrange from lowEndpoint to successor(highEndpoint).