Package org.unitConverter.math
Class ConditionalExistenceCollections.ConditionalExistenceMap<K,V>
- java.lang.Object
-
- java.util.AbstractMap<K,V>
-
- org.unitConverter.math.ConditionalExistenceCollections.ConditionalExistenceMap<K,V>
-
- Type Parameters:
K
- key typeV
- value type
- All Implemented Interfaces:
java.util.Map<K,V>
- Enclosing class:
- ConditionalExistenceCollections
static final class ConditionalExistenceCollections.ConditionalExistenceMap<K,V> extends java.util.AbstractMap<K,V>
Mappings in this map only exist if the entry passes some condition.- Since:
- 2019-10-17
- Author:
- Adrien Hopkins
-
-
Constructor Summary
Constructors Modifier Constructor Description private
ConditionalExistenceMap(java.util.Map<K,V> map, java.util.function.Predicate<java.util.Map.Entry<K,V>> entryExistenceCondition)
Creates theConditionalExistenceMap
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
containsKey(java.lang.Object key)
java.util.Set<java.util.Map.Entry<K,V>>
entrySet()
V
get(java.lang.Object key)
java.util.Set<K>
keySet()
V
put(K key, V value)
V
remove(java.lang.Object key)
java.util.Collection<V>
values()
-
Methods inherited from class java.util.AbstractMap
clear, clone, containsValue, equals, hashCode, isEmpty, putAll, size, toString
-
-
-
-
Method Detail
-
containsKey
public boolean containsKey(java.lang.Object key)
-
get
public V get(java.lang.Object key)
-
keySet
public java.util.Set<K> keySet()
-
remove
public V remove(java.lang.Object key)
-
-