Class AbstractIterableGetMapDecorator<K,V>
- java.lang.Object
-
- org.apache.commons.collections4.splitmap.AbstractIterableGetMapDecorator<K,V>
-
- Type Parameters:
K- the type of the keys in this mapV- the type of the values in this map
- All Implemented Interfaces:
Get<K,V>,IterableGet<K,V>
- Direct Known Subclasses:
TransformedSplitMap
public class AbstractIterableGetMapDecorator<K,V> extends java.lang.Object implements IterableGet<K,V>
- Since:
- 4.0
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractIterableGetMapDecorator()Constructor only used in deserialization, do not use otherwise.AbstractIterableGetMapDecorator(java.util.Map<K,V> map)Create a new AbstractSplitMapDecorator.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancontainsKey(java.lang.Object key)Tests for presence of a given key.booleancontainsValue(java.lang.Object value)Tests for presence of a given value.protected java.util.Map<K,V>decorated()Gets the map being decorated.java.util.Set<java.util.Map.Entry<K,V>>entrySet()Gets a set view of the mappings contained in this map.booleanequals(java.lang.Object object)Vget(java.lang.Object key)Gets a value at a given key.inthashCode()booleanisEmpty()Tests whether this instance contains any key-value mappings.java.util.Set<K>keySet()Gets a view of the keys contained in this map.MapIterator<K,V>mapIterator()Gets a MapIterator over this Get.Vremove(java.lang.Object key)Remove a key-value mappings.intsize()Gets the number of key-value mappings in this map.java.lang.StringtoString()java.util.Collection<V>values()Gets a a collection view of the values contained in this map.
-
-
-
Constructor Detail
-
AbstractIterableGetMapDecorator
protected AbstractIterableGetMapDecorator()
Constructor only used in deserialization, do not use otherwise.
-
AbstractIterableGetMapDecorator
public AbstractIterableGetMapDecorator(java.util.Map<K,V> map)
Create a new AbstractSplitMapDecorator.- Parameters:
map- the map to decorate, must not be null- Throws:
java.lang.NullPointerException- if map is null
-
-
Method Detail
-
containsKey
public boolean containsKey(java.lang.Object key)
Description copied from interface:GetTests for presence of a given key.- Specified by:
containsKeyin interfaceGet<K,V>- Parameters:
key- key whose presence in this map is to be tested- Returns:
trueif this map contains a mapping for the specified key- See Also:
Map.containsKey(Object)
-
containsValue
public boolean containsValue(java.lang.Object value)
Description copied from interface:GetTests for presence of a given value.- Specified by:
containsValuein interfaceGet<K,V>- Parameters:
value- value whose presence in this map is to be tested- Returns:
trueif this map maps one or more keys to the specified value- See Also:
Map.containsValue(Object)
-
decorated
protected java.util.Map<K,V> decorated()
Gets the map being decorated.- Returns:
- the decorated map
-
entrySet
public java.util.Set<java.util.Map.Entry<K,V>> entrySet()
Description copied from interface:GetGets a set view of the mappings contained in this map.
-
equals
public boolean equals(java.lang.Object object)
- Overrides:
equalsin classjava.lang.Object
-
get
public V get(java.lang.Object key)
Description copied from interface:GetGets a value at a given key.
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
isEmpty
public boolean isEmpty()
Description copied from interface:GetTests whether this instance contains any key-value mappings.
-
keySet
public java.util.Set<K> keySet()
Description copied from interface:GetGets a view of the keys contained in this map.
-
mapIterator
public MapIterator<K,V> mapIterator()
Gets a MapIterator over this Get.- Specified by:
mapIteratorin interfaceIterableGet<K,V>- Returns:
- MapIterator<K, V>
-
remove
public V remove(java.lang.Object key)
Description copied from interface:GetRemove a key-value mappings.
-
size
public int size()
Description copied from interface:GetGets the number of key-value mappings in this map.
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-