K
- Key typeE
- Collection element typepublic class BufferingMap<K,E> extends Object
Constructor and Description |
---|
BufferingMap(Supplier<? extends Collection<E>> valueSupplier) |
Modifier and Type | Method and Description |
---|---|
void |
add(K key,
E element)
Add a new element into the corresponding bucket
(a new bucket will be created, if mapping for this key does not exist yet).
|
boolean |
containsKey(K key) |
Collection<E> |
removeCopy(K key)
Remove and return all elements for a given key.
|
public BufferingMap(Supplier<? extends Collection<E>> valueSupplier)
valueSupplier
- Factory of new containers for elementspublic boolean containsKey(K key)
public void add(K key, E element)
public Collection<E> removeCopy(K key)
Copyright © 2016–2021. All rights reserved.