Package net.infonode.util.collection.map
Class MapAdapter
- java.lang.Object
-
- net.infonode.util.collection.map.MapAdapter
-
- All Implemented Interfaces:
Collection,ConstCollection,ConstMap,Map
public class MapAdapter extends java.lang.Object implements Map
-
-
Constructor Summary
Constructors Constructor Description MapAdapter()MapAdapter(java.util.HashMap map)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclear()Removes all elements from this collection..ConstMapIteratorconstIterator()Returns an iterator for this map.booleancontainsKey(java.lang.Object key)Returns true if this map contains the key.booleancontainsValue(java.lang.Object value)Returns true if this map contains the value.java.lang.Objectget(java.lang.Object key)Returns the value associated with the key.booleanisEmpty()Returns true if this collection is empty.MapIteratoriterator()Returns an iterator for this map.java.lang.Objectput(java.lang.Object key, java.lang.Object value)Associate a key with a value.java.lang.Objectremove(java.lang.Object key)Removes a key and it's value.intsize()
-
-
-
Method Detail
-
put
public java.lang.Object put(java.lang.Object key, java.lang.Object value)Description copied from interface:MapAssociate a key with a value. This will overwrite any existing association.
-
remove
public java.lang.Object remove(java.lang.Object key)
Description copied from interface:MapRemoves a key and it's value.
-
clear
public void clear()
Description copied from interface:CollectionRemoves all elements from this collection..- Specified by:
clearin interfaceCollection
-
iterator
public MapIterator iterator()
Description copied from interface:MapReturns an iterator for this map.
-
get
public java.lang.Object get(java.lang.Object key)
Description copied from interface:ConstMapReturns the value associated with the key.
-
containsKey
public boolean containsKey(java.lang.Object key)
Description copied from interface:ConstMapReturns true if this map contains the key.- Specified by:
containsKeyin interfaceConstMap- Parameters:
key- the key- Returns:
- true if this map contains the key
-
containsValue
public boolean containsValue(java.lang.Object value)
Description copied from interface:ConstMapReturns true if this map contains the value.- Specified by:
containsValuein interfaceConstMap- Parameters:
value- the value- Returns:
- true if this map contains the value
-
isEmpty
public boolean isEmpty()
Description copied from interface:ConstCollectionReturns true if this collection is empty.- Specified by:
isEmptyin interfaceConstCollection- Returns:
- true if this collection is empty
-
constIterator
public ConstMapIterator constIterator()
Description copied from interface:ConstMapReturns an iterator for this map.- Specified by:
constIteratorin interfaceConstMap- Returns:
- an iterator for this map
-
size
public int size()
-
-