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
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionfinal LruCache.Entry<K,
V> next()
Returns the cache entry that immediately follows this entry, ornull
if this is the LRU entry.final LruCache.Entry<K,
V> prev()
Returns the cache entry that is immediately followed by this entry, ornull
if 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, ornull
if this is the MRU entry.- Returns:
- the cache entry that is immediately followed by this entry,
or
null
if this is the MRU entry
-
next
Returns the cache entry that immediately follows this entry, ornull
if this is the LRU entry.- Returns:
- the cache entry that immediately follows this entry,
or
null
if this is the LRU entry
-
toString
-