public class BoundedCostOrderedMap<K,V> extends AbstractMap<K,V>
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>
Constructor and Description |
---|
BoundedCostOrderedMap(java.util.function.Function<V,Double> costFunction,
int maxSize,
double maxCost) |
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) |
double |
getCost(V value) |
boolean |
isEmpty() |
Set<K> |
keySet() |
V |
put(K key,
V value) |
void |
putAll(Map<? extends K,? extends V> m) |
V |
remove(Object key) |
int |
size() |
double |
topCost() |
K |
topKey() |
Collection<V> |
values() |
List<V> |
valuesList() |
clone, equals, hashCode, toString
finalize, getClass, notify, notifyAll, wait, wait, wait
compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAll
public BoundedCostOrderedMap(java.util.function.Function<V,Double> costFunction, int maxSize, double maxCost)
public int size()
public boolean isEmpty()
public boolean containsKey(Object key)
containsKey
in interface Map<K,V>
containsKey
in class AbstractMap<K,V>
public boolean containsValue(Object value)
containsValue
in interface Map<K,V>
containsValue
in class AbstractMap<K,V>
public double getCost(V value)
public void clear()
public Collection<V> values()
public double topCost()
public K topKey()