public class LRUHashMap<K,V> extends Object implements Map<K,V>
| Constructor and Description |
|---|
LRUHashMap(int maxsize) |
LRUHashMap(int maxsize,
int initial) |
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Clear the map.
|
Object |
clone()
FIXME Needs an implementation
|
boolean |
containsKey(Object key)
Returns T if this map contains the keyed object.
|
boolean |
containsValue(Object value)
Returns T if this map contains the value.
|
Set<Map.Entry<K,V>> |
entrySet()
Returns a collection view of the mappings contained in this map.
|
V |
get(Object key)
Retrieve a value by key.
|
int |
getMaxSize() |
boolean |
isEmpty() |
Set<K> |
keySet() |
static void |
main(String[] args) |
V |
put(K key,
V value)
Associates the specified value with the specified key in this map.
|
void |
putAll(Map<? extends K,? extends V> m)
Adds all of the elements to this map.
|
V |
remove(Object key)
Remove an entry by key.
|
int |
size()
Returns the current #elements in the map.
|
Collection<V> |
values() |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcompute, computeIfAbsent, computeIfPresent, equals, forEach, getOrDefault, hashCode, merge, putIfAbsent, remove, replace, replace, replaceAllpublic LRUHashMap(int maxsize)
public LRUHashMap(int maxsize,
int initial)
public int size()
public int getMaxSize()
public V get(Object key)
public boolean containsKey(Object key)
containsKey in interface Map<K,V>public V put(K key, V value)
put in interface Map<K,V>key - key with which the specified value is to be associated.value - value to be associated with the specified key.public V remove(Object key)
remove in interface Map<K,V>Map.remove(java.lang.Object)public boolean containsValue(Object value)
containsValue in interface Map<K,V>Map.containsValue(java.lang.Object)public Set<Map.Entry<K,V>> entrySet()
public static void main(String[] args)
Copyright © 2017 etc.to. All rights reserved.