public interface ARC<K,V>
extends java.lang.Iterable<java.util.Map.Entry<K,V>>
Modifier and Type | Method and Description |
---|---|
void |
clear()
clear the cache
|
boolean |
containsKey(K key)
check if the map contains the key
|
java.util.Set<java.util.Map.Entry<K,V>> |
entrySet()
Return a Set view of the mappings contained in this map.
|
V |
get(K s)
get a value from the cache.
|
java.util.Collection<K> |
getKeys(V value)
check if the map contains the value
|
int |
hashCode()
a hash code for this ARC
|
void |
insert(K s,
V v)
put a value to the cache.
|
void |
insertIfAbsent(K s,
V v)
put a value to the cache if there was not an entry before
do not return a previous content value
|
java.util.Iterator<java.util.Map.Entry<K,V>> |
iterator()
iterator implements the Iterable interface
the method can easily be implemented using the entrySet method
|
V |
put(K s,
V v)
put a value to the cache.
|
V |
putIfAbsent(K s,
V v)
put a value to the cache if there was not an entry before
return a previous content value
|
V |
remove(K s)
remove an entry from the cache
|
int |
size()
get the size of the ARC.
|
int size()
void insert(K s, V v)
s
- v
- void insertIfAbsent(K s, V v)
s
- v
- V putIfAbsent(K s, V v)
s
- v
- java.util.Collection<K> getKeys(V value)
value
- boolean containsKey(K key)
key
- void clear()
java.util.Iterator<java.util.Map.Entry<K,V>> iterator()
java.util.Set<java.util.Map.Entry<K,V>> entrySet()
int hashCode()
hashCode
in class java.lang.Object