Class NoOpMap<K,V>
- java.lang.Object
-
- java.util.AbstractMap<K,V>
-
- org.apache.activemq.artemis.utils.collections.NoOpMap<K,V>
-
- Type Parameters:
K- the key type.V- the value type.
- All Implemented Interfaces:
Map<K,V>
public class NoOpMap<K,V> extends AbstractMap<K,V>
This class implements a Map, but actually doesnt store anything, it is similar in idea to an EmptyMap, but where mutation methods simply do a no op rather than UnsupportedOperationException as with EmptyMap. This is used in QueueImpl when message groups is disabled.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K extends Object,V extends Object>, AbstractMap.SimpleImmutableEntry<K extends Object,V extends Object>
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancontainsKey(Object key)booleancontainsValue(Object value)Set<Map.Entry<K,V>>entrySet()booleanequals(Object o)Vget(Object key)inthashCode()static <K,V>
Map<K,V>instance()booleanisEmpty()Set<K>keySet()Vput(K key, V value)intsize()Collection<V>values()-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAll
-
-
-
-
Method Detail
-
instance
public static <K,V> Map<K,V> instance()
-
size
public int size()
-
isEmpty
public boolean isEmpty()
-
containsKey
public boolean containsKey(Object key)
- Specified by:
containsKeyin interfaceMap<K,V>- Overrides:
containsKeyin classAbstractMap<K,V>
-
containsValue
public boolean containsValue(Object value)
- Specified by:
containsValuein interfaceMap<K,V>- Overrides:
containsValuein classAbstractMap<K,V>
-
values
public Collection<V> values()
-
equals
public boolean equals(Object o)
-
-