java.lang.Object | |
↳ | com.facebook.imagepipeline.cache.CountingLruMap<K, V> |
Map that keeps track of the elements order (according to the LRU policy) and their size.
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
CountingLruMap(ValueDescriptor<V> valueDescriptor) |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
synchronized ArrayList<V> |
clear()
Clears the map.
| ||||||||||
synchronized boolean |
contains(K key)
Returns whether the map contains an element with the given key.
| ||||||||||
synchronized V |
get(K key)
Gets the element from the map.
| ||||||||||
synchronized int |
getCount()
Gets the count of the elements in the map.
| ||||||||||
synchronized K |
getFirstKey()
Gets the key of the first element in the map.
| ||||||||||
synchronized ArrayList<Entry<K, V>> |
getMatchingEntries(Predicate<K> predicate)
Gets the all matching elements.
| ||||||||||
synchronized int |
getSizeInBytes()
Gets the total size in bytes of the elements in the map.
| ||||||||||
synchronized V |
put(K key, V value)
Adds the element to the map, and removes the old element with the same key if any.
| ||||||||||
synchronized V |
remove(K key)
Removes the element from the map.
| ||||||||||
synchronized ArrayList<V> |
removeAll(Predicate<K> predicate)
Removes all the matching elements from the map.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
|
Clears the map.
Returns whether the map contains an element with the given key.
Gets the element from the map.
Gets the count of the elements in the map.
Gets the key of the first element in the map.
Gets the all matching elements.
Gets the total size in bytes of the elements in the map.
Adds the element to the map, and removes the old element with the same key if any.
Removes the element from the map.
Removes all the matching elements from the map.