Top Description Fields Constructors Methods
org.eclipse.collections.impl.map.sorted.mutable

public Class UnmodifiableSortedMap<K, V>

extends UnmodifiableMap<K, V>
implements SortedMap<K, V>
Class Inheritance
All Implemented Interfaces
java.util.SortedMap, java.util.SequencedMap, java.util.Map
Known Direct Subclasses
org.eclipse.collections.impl.map.sorted.mutable.UnmodifiableTreeMap
Imports
java.util.Comparator, .SortedMap, org.eclipse.collections.impl.UnmodifiableMap

An unmodifiable view of a SortedMap.

Field Summary

Modifier and TypeField and Description
private static final long
Inherited from org.eclipse.collections.impl.UnmodifiableMap:
delegate

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public Comparator<? super K>
comparator()

Implements java.util.SortedMap.comparator.

Returns the comparator used to order the keys in this map, or null if this map uses the natural ordering of its keys.

public K
firstKey()

Implements java.util.SortedMap.firstKey.

Returns the first (lowest) key currently in this map.

protected SortedMap<K, V>
public SortedMap<K, V>
headMap(K toKey)

Implements java.util.SortedMap.headMap.

Returns a view of the portion of this map whose keys are strictly less than toKey.

public K
lastKey()

Implements java.util.SortedMap.lastKey.

Returns the last (highest) key currently in this map.

public SortedMap<K, V>
subMap(K fromKey, K toKey)

Implements java.util.SortedMap.subMap.

Returns a view of the portion of this map whose keys range from fromKey, inclusive, to toKey, exclusive.

public SortedMap<K, V>
tailMap(K fromKey)

Implements java.util.SortedMap.tailMap.

Returns a view of the portion of this map whose keys are greater than or equal to fromKey.

Inherited from org.eclipse.collections.impl.UnmodifiableMap:
clearcontainsKeycontainsValueentrySetequalsgethashCodeisEmptykeySetputputAllremovesizetoStringvalues

Field Detail

serialVersionUIDback to summary
private static final long serialVersionUID

Hides org.eclipse.collections.impl.UnmodifiableMap.serialVersionUID.

Constructor Detail

UnmodifiableSortedMapback to summary
public UnmodifiableSortedMap(SortedMap<K, V> delegate)

Method Detail

comparatorback to summary
public Comparator<? super K> comparator()

Implements java.util.SortedMap.comparator.

Doc from java.util.SortedMap.comparator.

Returns the comparator used to order the keys in this map, or null if this map uses the natural ordering of its keys.

Annotations
@Override
firstKeyback to summary
public K firstKey()

Implements java.util.SortedMap.firstKey.

Doc from java.util.SortedMap.firstKey.

Returns the first (lowest) key currently in this map.

Annotations
@Override
getSortedMapback to summary
protected SortedMap<K, V> getSortedMap()
headMapback to summary
public SortedMap<K, V> headMap(K toKey)

Implements java.util.SortedMap.headMap.

Doc from java.util.SortedMap.headMap.

Returns a view of the portion of this map whose keys are strictly less than toKey. The returned map is backed by this map, so changes in the returned map are reflected in this map, and vice-versa. The returned map supports all optional map operations that this map supports.

The returned map will throw an IllegalArgumentException on an attempt to insert a key outside its range.

Annotations
@Override
lastKeyback to summary
public K lastKey()

Implements java.util.SortedMap.lastKey.

Doc from java.util.SortedMap.lastKey.

Returns the last (highest) key currently in this map.

Annotations
@Override
subMapback to summary
public SortedMap<K, V> subMap(K fromKey, K toKey)

Implements java.util.SortedMap.subMap.

Doc from java.util.SortedMap.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 map is empty.) The returned map is backed by this map, so changes in the returned map are reflected in this map, and vice-versa. The returned map supports all optional map operations that this map supports.

The returned map will throw an IllegalArgumentException on an attempt to insert a key outside its range.

Annotations
@Override
tailMapback to summary
public SortedMap<K, V> tailMap(K fromKey)

Implements java.util.SortedMap.tailMap.

Doc from java.util.SortedMap.tailMap.

Returns a view of the portion of this map whose keys are greater than or equal to fromKey. The returned map is backed by this map, so changes in the returned map are reflected in this map, and vice-versa. The returned map supports all optional map operations that this map supports.

The returned map will throw an IllegalArgumentException on an attempt to insert a key outside its range.

Annotations
@Override