public class HashMultiMap extends Object implements MultiMap, Serializable
Map
,
Serialized FormConstructor and Description |
---|
HashMultiMap()
build a new HashMultiMap.
|
Modifier and Type | Method and Description |
---|---|
void |
clear()
Removes all mappings from this map (optional operation).
|
boolean |
containsKey(Object key)
Returns true if this multimap contains a mapping for
the specified key.
|
boolean |
containsValue(Object value)
Returns true if this multimap maps one or more keys to
the specified value.
|
boolean |
equals(Object o)
Compares the specified object with this multimap for equality.
|
List |
get(Object key)
Returns a list of values to which this multimap maps the specified
key.
|
int |
hashCode()
Returns the hash code value for this multimap.
|
boolean |
isEmpty()
Returns true if this multimap contains no mappings.
|
Set |
keySet()
Returns a set view of the keys contained in this multimap.
|
void |
put(Object key,
Object value)
Adds the specified value with the specified key to this multimap.
|
void |
putAll(MultiMap t)
Copies all entries from the specified multimap to this
multimap.
|
void |
remove(Object key)
Removes all mappings for this key from this multimap if present.
|
void |
remove(Object key,
Object value)
Removes the specified key/value mapping from this multimap if present.
|
int |
size()
Returns the number of values in this multimap.
|
public int size()
public boolean isEmpty()
public boolean containsKey(Object key)
containsKey
in interface MultiMap
key
- public boolean containsValue(Object value)
containsValue
in interface MultiMap
public List get(Object key)
public void put(Object key, Object value)
public void putAll(MultiMap t)
public void remove(Object key)
public void remove(Object key, Object value)
public void clear()
public Set keySet()
public boolean equals(Object o)
Copyright © 2021. All rights reserved.