public class DoubleHashMap<K,V> extends Object implements Map<K,V>
getByValue(Object)
.
There are some caveats. For one thing, this assumes that there
is a one to one correspondence between keys and values so
this specifically dis-allows null objects as values. Multiple values will get over-written.
with "predictable but unwanted results."
Created by Jeff Gaynor
on 3/1/12 at 2:06 PM
Constructor and Description |
---|
DoubleHashMap() |
Modifier and Type | Method and Description |
---|---|
void |
clear() |
boolean |
containsKey(Object key) |
boolean |
containsValue(Object value) |
Set<Map.Entry<K,V>> |
entrySet() |
V |
get(Object key) |
K |
getByValue(V value) |
boolean |
isEmpty() |
Set<K> |
keySet() |
V |
put(K key,
V value) |
void |
putAll(Map<? extends K,? extends V> m)
Slow since this loops.
|
V |
remove(Object key) |
int |
size() |
Collection<V> |
values() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
compute, computeIfAbsent, computeIfPresent, equals, forEach, getOrDefault, hashCode, merge, putIfAbsent, remove, replace, replace, replaceAll
public boolean containsKey(Object key)
containsKey
in interface Map<K,V>
public boolean containsValue(Object value)
containsValue
in interface Map<K,V>
public void putAll(Map<? extends K,? extends V> m)
Copyright © 2019. All Rights Reserved.