Module org.jhotdraw8.icollection
Interface ReadOnlySortedMap<K,V>
- Type Parameters:
K- the key typeV- the value type
- All Superinterfaces:
Iterable<Map.Entry<K,,V>> ReadOnlyMap<K,,V> ReadOnlySequencedMap<K,V>
- All Known Subinterfaces:
ImmutableNavigableMap<K,,V> ImmutableSortedMap<K,,V> ReadOnlyNavigableMap<K,V>
- All Known Implementing Classes:
MutableRedBlackMap,ReadOnlyNavigableMapFacade,ReadOnlySortedMapFacade,RedBlackMap
A read-only interface to a sorted map. A sorted map is a map that provides a total ordering on its keys.
-
Method Summary
Modifier and TypeMethodDescriptiondefault intReturns the spliterator characteristics of the key set.@Nullable Comparator<? super K> Returns the comparator used to order the keys in this map, or null if this set uses the natural ordering of its keys.static <K,V> boolean sortedMapEquals(@NonNull ReadOnlySortedMap<K, V> map, Object o) Compares a read-only map with an object for equality.default @NonNull Spliterator<Map.Entry<K, V>> Returns a spliterator over the entries contained in this map.Methods inherited from interface org.jhotdraw8.icollection.readonly.ReadOnlyMap
containsEntry, containsKey, containsValue, equals, get, getOrDefault, hashCode, isEmpty, iterator, sizeMethods inherited from interface org.jhotdraw8.icollection.readonly.ReadOnlySequencedMap
asMap, firstEntry, lastEntry, readOnlyEntrySet, readOnlyKeySet, readOnlyReversed, readOnlyValues
-
Method Details
-
comparator
@Nullable Comparator<? super K> comparator()Returns the comparator used to order the keys in this map, or null if this set uses the natural ordering of its keys.- Returns:
- comparator or null
-
sortedMapEquals
Compares a read-only map with an object for equality. Returnstrueif the given object is also a read-only map and the two maps represent the same entries.This operation is more efficient than
ReadOnlyMap.mapEquals(ReadOnlyMap, Object).- Type Parameters:
K- the key typeV- the value type- Parameters:
map- a mapo- an object- Returns:
trueif the object is equal to the map
-
spliterator
Returns a spliterator over the entries contained in this map.- Specified by:
spliteratorin interfaceIterable<K>- Specified by:
spliteratorin interfaceReadOnlyMap<K,V> - Returns:
- a spliterator
-
characteristics
default int characteristics()Description copied from interface:ReadOnlySequencedMapReturns the spliterator characteristics of the key set. This implementation returnsSpliterator.SIZED|Spliterator.DISTINCT.- Specified by:
characteristicsin interfaceReadOnlyMap<K,V> - Specified by:
characteristicsin interfaceReadOnlySequencedMap<K,V> - Returns:
- characteristics.
-