Package org.eclipse.handly.util

## Class LruCache.Entry<K,​V>

- java.lang.Object
- - org.eclipse.handly.util.LruCache.Entry<K,​V>

- Enclosing class:
    LruCache<K,​V>

      protected static class LruCache.Entry<K,​V>
      extends java.lang.Object

  An LRU cache entry. Entries are ordered in the cache from most recently accessed to least recently accessed.

- - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `K` | `key` | The key of this entry (never `null`).
    `V` | `value` | The value of this entry (never `null`).

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `Entry​(K key, V value)` | Constructs a cache entry with the given key and value.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `LruCache.Entry<K,​V>` | `next()` | Returns the cache entry that immediately follows this entry, or `null` if this is the LRU entry.
    `LruCache.Entry<K,​V>` | `prev()` | Returns the cache entry that is immediately followed by this entry, or `null` if this is the MRU entry.
    `java.lang.String` | `toString()` |

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### key

          public final K key

      The key of this entry (never `null`).

    - #### value

          public V value

      The value of this entry (never `null`).

  - ### Constructor Detail

    - #### Entry

          public Entry​(K key,
                       V value)

      Constructs a cache entry with the given key and value.
      Parameters:
        `key` - the key of the entry (never `null`)
        `value` - the value of the entry (never `null`)

  - ### Method Detail

    - #### prev

          public final LruCache.Entry<K,​V> prev()

      Returns the cache entry that is immediately followed by this entry, or `null` 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

          public final LruCache.Entry<K,​V> next()

      Returns the cache entry that immediately follows this entry, or `null` if this is the LRU entry.
      Returns:
        the cache entry that immediately follows this entry, or `null` if this is the LRU entry

    - #### toString

          public java.lang.String toString()

      Overrides:
        `toString` in class `java.lang.Object`