Package org.eclipse.handly.util
Class LruCache.Entry<K,V>
java.lang.Object
org.eclipse.handly.util.LruCache.Entry<K,V>
An LRU cache entry. Entries are ordered in the cache from
most recently accessed to least recently accessed.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal LruCache.Entry<K,V> next()Returns the cache entry that immediately follows this entry, ornullif this is the LRU entry.final LruCache.Entry<K,V> prev()Returns the cache entry that is immediately followed by this entry, ornullif this is the MRU entry.toString()
-
Field Details
-
key
The key of this entry (nevernull). -
value
The value of this entry (nevernull).
-
-
Constructor Details
-
Entry
Constructs a cache entry with the given key and value.- Parameters:
key- the key of the entry (nevernull)value- the value of the entry (nevernull)
-
-
Method Details
-
prev
Returns the cache entry that is immediately followed by this entry, ornullif this is the MRU entry.- Returns:
- the cache entry that is immediately followed by this entry,
or
nullif this is the MRU entry
-
next
Returns the cache entry that immediately follows this entry, ornullif this is the LRU entry.- Returns:
- the cache entry that immediately follows this entry,
or
nullif this is the LRU entry
-
toString
-