Module org.jhotdraw8.icollection
Package org.jhotdraw8.icollection.facade
Class ReadOnlySequencedMapFacade<K,V>
java.lang.Object
org.jhotdraw8.icollection.facade.ReadOnlyMapFacade<K,V>
org.jhotdraw8.icollection.facade.ReadOnlySequencedMapFacade<K,V>
- Type Parameters:
K- the key typeV- the value type
- All Implemented Interfaces:
Iterable<Map.Entry<K,,V>> ReadOnlyMap<K,,V> ReadOnlySequencedMap<K,V>
public class ReadOnlySequencedMapFacade<K,V>
extends ReadOnlyMapFacade<K,V>
implements ReadOnlySequencedMap<K,V>
Provides a
ReadOnlySequencedMap facade to a set of ReadOnlySequencedMap functions.- Author:
- Werner Randelshofer
-
Field Summary
Fields inherited from class org.jhotdraw8.icollection.facade.ReadOnlyMapFacade
containsKeyFunction, getFunction, iteratorFunction, sizeFunction -
Constructor Summary
ConstructorsConstructorDescriptionReadOnlySequencedMapFacade(Supplier<Iterator<Map.Entry<K, V>>> iteratorFunction, Supplier<Iterator<Map.Entry<K, V>>> reverseIteratorFunction, IntSupplier sizeFunction, Predicate<Object> containsKeyFunction, Function<K, V> getFunction, Supplier<Map.Entry<K, V>> firstEntryFunction, Supplier<Map.Entry<K, V>> lastEntryFunction, int characteristics, @Nullable Comparator<? super K> comparator) ReadOnlySequencedMapFacade(SequencedMap<K, V> target) -
Method Summary
Modifier and TypeMethodDescriptionintReturns the spliterator characteristics of the key set.Gets the first entry in this map ornullif this map is empty.Gets the last entry in this map ornullif this map is empty.Returns a reversed-order view of this map.Methods inherited from class org.jhotdraw8.icollection.facade.ReadOnlyMapFacade
containsEntry, containsKey, get, isEmpty, iterator, sizeMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.jhotdraw8.icollection.readonly.ReadOnlyMap
containsEntry, containsKey, containsValue, equals, get, getOrDefault, hashCode, isEmpty, iterator, size, spliteratorMethods inherited from interface org.jhotdraw8.icollection.readonly.ReadOnlySequencedMap
asMap, readOnlyEntrySet, readOnlyKeySet, readOnlyValues
-
Constructor Details
-
ReadOnlySequencedMapFacade
-
ReadOnlySequencedMapFacade
public ReadOnlySequencedMapFacade(Supplier<Iterator<Map.Entry<K, V>>> iteratorFunction, Supplier<Iterator<Map.Entry<K, V>>> reverseIteratorFunction, IntSupplier sizeFunction, Predicate<Object> containsKeyFunction, Function<K, V> getFunction, Supplier<Map.Entry<K, V>> firstEntryFunction, Supplier<Map.Entry<K, V>> lastEntryFunction, int characteristics, @Nullable Comparator<? super K> comparator)
-
-
Method Details
-
readOnlyReversed
Description copied from interface:ReadOnlySequencedMapReturns a reversed-order view of this map.Changes to the underlying map are visible in the reversed view.
- Specified by:
readOnlyReversedin interfaceReadOnlySequencedMap<K,V> - Returns:
- a reversed-order view of this map
-
firstEntry
Description copied from interface:ReadOnlySequencedMapGets the first entry in this map ornullif this map is empty.- Specified by:
firstEntryin interfaceReadOnlySequencedMap<K,V> - Returns:
- the first entry or
null
-
lastEntry
Description copied from interface:ReadOnlySequencedMapGets the last entry in this map ornullif this map is empty.- Specified by:
lastEntryin interfaceReadOnlySequencedMap<K,V> - Returns:
- the last entry or
null
-
characteristics
public 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.
-