net.sf.molae.pipe.genimpl
Class ListsBackedMap
java.lang.Object
|
+--java.util.AbstractMap
|
+--net.sf.molae.pipe.basic.AbstractMapWithSet
|
+--net.sf.molae.pipe.genimpl.ListsBackedMap
- All Implemented Interfaces:
- Map
- public final class ListsBackedMap
- extends AbstractMapWithSet
This class implements the map interface using a list of keys
and a list of values.
Null values are allowed.
Null keys are not allowed.
- Since:
- 1.1
ListsBackedMap
public ListsBackedMap(List keys,
List valueList)
- Constructs a new ListsBackedMap.
- Parameters:
keys - keys of the mapvalueList - values of the map- Throws:
NullPointerException - if any of the specified objects
is null
ListsBackedMap
public ListsBackedMap(List keys)
- Constructs a new ListsBackedMap.
- Parameters:
keys - keys of the map- Throws:
NullPointerException - if any of the specified objects
is null
containsValue
public boolean containsValue(Object value)
- Overrides:
containsValue in class AbstractMap
get
public Object get(Object key)
- Overrides:
get in class AbstractMap
put
public Object put(Object key,
Object value)
- Overrides:
put in class AbstractMap
remove
public Object remove(Object key)
- Overrides:
remove in class AbstractMap
clear
public void clear()
- Overrides:
clear in class AbstractMap
values
public Collection values()
- Overrides:
values in class AbstractMap
getEntrySetIterator
protected Iterator getEntrySetIterator()
- Description copied from class:
AbstractMapWithSet
- Returns the iterator of the entry set.
- Overrides:
getEntrySetIterator in class AbstractMapWithSet
- Following copied from class:
net.sf.molae.pipe.basic.AbstractMapWithSet
- Returns:
- the iterator of the entry set.