subMap
Returns a view of the portion of this map whose keys range from fromKey, inclusive,
to toKey, exclusive. (If fromKey and toKey are equal, the returned sorted map is empty.)
Parameters:
from
-
low endpoint (inclusive) of the subMap.
to
-
high endpoint (exclusive) of the subMap.
Returns:
a view of the portion of this map whose keys range from fromKey, inclusive, to toKey, exclusive.
tailMap
Returns a view of the portion of this map whose keys are greater than or equal
to fromKey. The returned sorted map is backed by this map, so changes in the
returned sorted map are reflected in this map, and vice-versa. The returned
sorted map supports all optional map operations.
Parameters:
key
-
low endpoint (inclusive) of the tailMap.
Returns:
a view of the portion of this map whose keys are greater than or equal to fromKey.