Back to Fresco

CountingLruMap

docs/javadoc/reference/com/facebook/imagepipeline/cache/CountingLruMap.html

3.6.016.8 KB
Original Source

Fresco

|

|

Packages | Classes

Interfaces

Classes

Packages | Classes

Summary: Ctors | Methods | Inherited Methods | [Expand All]

public class

CountingLruMap

extends Object

| java.lang.Object | | ↳ | com.facebook.imagepipeline.cache.CountingLruMap<K, V> |

Class Overview

Map that keeps track of the elements order (according to the LRU policy) and their size.

Summary

Public Constructors
Public Methods
synchronized ArrayList<V>
Clears the map.
synchronized boolean
Returns whether the map contains an element with the given key.
synchronized V
Gets the element from the map.
synchronized int
Gets the count of the elements in the map.
synchronized K
Gets the key of the first element in the map.
synchronized ArrayList<Entry<K, V>>
Gets the all matching elements.
synchronized int
Gets the total size in bytes of the elements in the map.
synchronized V
Adds the element to the map, and removes the old element with the same key if any.
synchronized V
Removes the element from the map.
synchronized ArrayList<V>
Removes all the matching elements from the map.

| [Expand] Inherited Methods | | --- | | From class java.lang.Object

| Object | clone() | | boolean | equals(Object arg0) | | void | finalize() | | final Class<?> | getClass() | | int | hashCode() | | final void | notify() | | final void | notifyAll() | | String | toString() | | final void | wait(long arg0, int arg1) | | final void | wait(long arg0) | | final void | wait() |

|

Public Constructors

public CountingLruMap(ValueDescriptor<V> valueDescriptor)

Public Methods

public synchronized ArrayList<V> clear()

Clears the map.

public synchronized boolean contains(K key)

Returns whether the map contains an element with the given key.

public synchronized V get(K key)

Gets the element from the map.

public synchronized int getCount()

Gets the count of the elements in the map.

public synchronized K getFirstKey()

Gets the key of the first element in the map.

public synchronized ArrayList<Entry<K, V>> getMatchingEntries(Predicate<K> predicate)

Gets the all matching elements.

public synchronized int getSizeInBytes()

Gets the total size in bytes of the elements in the map.

public synchronized V put(K key, V value)

Adds the element to the map, and removes the old element with the same key if any.

public synchronized V remove(K key)

Removes the element from the map.

public synchronized ArrayList<V> removeAll(Predicate<K> predicate)

Removes all the matching elements from the map.

+Generated by Doclava. +