java.lang.Object
java.util.AbstractMap<K,V>
org.jhotdraw8.icollection.facade.MapFacade<K,V>
- Type Parameters:
K- the key typeV- the value type
- All Implemented Interfaces:
Map<K,V>
- Direct Known Subclasses:
SequencedMapFacade
Provides a
Map facade to a set of Map functions.- Author:
- Werner Randelshofer
-
Nested Class Summary
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K, V> -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final Runnableprotected final BiFunction<K, V, V> protected final IntSupplierprotected final Supplier<Spliterator<Map.Entry<K, V>>> -
Constructor Summary
ConstructorsConstructorDescriptionMapFacade(Supplier<Iterator<Map.Entry<K, V>>> iteratorFunction, Supplier<Spliterator<Map.Entry<K, V>>> spliteratorFunction, IntSupplier sizeFunction, Predicate<Object> containsKeyFunction, Function<K, V> getFunction, @Nullable Runnable clearFunction, @Nullable Function<Object, V> removeFunction, @Nullable BiFunction<K, V, V> putFunction) MapFacade(ReadOnlyMap<K, V> m) -
Method Summary
Methods inherited from class java.util.AbstractMap
clear, clone, containsValue, equals, hashCode, isEmpty, keySet, putAll, toString, valuesMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, forEach, merge, putIfAbsent, remove, replace, replace, replaceAll
-
Field Details
-
iteratorFunction
-
spliteratorFunction
-
sizeFunction
-
containsKeyFunction
-
clearFunction
-
removeFunction
-
getFunction
-
putFunction
-
-
Constructor Details
-
MapFacade
-
MapFacade
-
MapFacade
public MapFacade(Supplier<Iterator<Map.Entry<K, V>>> iteratorFunction, Supplier<Spliterator<Map.Entry<K, V>>> spliteratorFunction, IntSupplier sizeFunction, Predicate<Object> containsKeyFunction, Function<K, V> getFunction, @Nullable Runnable clearFunction, @Nullable Function<Object, V> removeFunction, @Nullable BiFunction<K, V, V> putFunction)
-
-
Method Details
-
get
-
containsKey
- Specified by:
containsKeyin interfaceMap<K,V> - Overrides:
containsKeyin classAbstractMap<K,V>
-
size
public int size() -
containsEntry
-
entrySet
-
getOrDefault
-
remove
-
put
-