| Constructor and Description |
|---|
CollectionMap()
Creates a CollectionMap.
|
CollectionMap(Class mapClass)
Creates a CollectionMap backed by the given Map class.
|
CollectionMap(Class mapClass,
Class collectionClass) |
| Modifier and Type | Method and Description |
|---|---|
void |
addItem(Object key,
Object item)
Adds the item to the Collection at the given key, creating a new Collection if
necessary.
|
void |
addItems(CollectionMap other) |
void |
addItems(Object key,
Collection items)
Adds the items to the Collection at the given key, creating a new Collection if
necessary.
|
void |
clear() |
boolean |
containsKey(Object key) |
boolean |
containsValue(Object value) |
Set |
entrySet() |
Object |
get(Object key) |
Collection |
getItems(Object key) |
Map |
getMap() |
boolean |
isEmpty() |
Set |
keySet()
Returns the keys.
|
Object |
put(Object key,
Object value) |
void |
putAll(Map map) |
Object |
remove(Object key) |
void |
removeItem(Object key,
Object item) |
void |
removeItems(Object key,
Collection items) |
int |
size()
Returns the number of mappings.
|
Collection |
values()
Returns the values.
|
public CollectionMap(Class mapClass)
mapClass - a Class that implements Mappublic CollectionMap()
public void addItem(Object key, Object item)
key - the key to the Collection to which the item should be addeditem - the item to addpublic void addItems(Object key, Collection items)
key - the key to the Collection to which the items should be addeditems - the items to addpublic void addItems(CollectionMap other)
public Collection values()
public Set keySet()
public int size()
public Collection getItems(Object key)
public boolean containsKey(Object key)
containsKey in interface Mappublic boolean containsValue(Object value)
containsValue in interface Mappublic void removeItems(Object key, Collection items)
public Map getMap()
Copyright © 2015. All rights reserved.