Class LRUMap<K,V>

java.lang.Object
java.util.AbstractMap<K,V>
java.util.HashMap<K,V>
java.util.LinkedHashMap<K,V>
org.apache.ofbiz.base.util.collections.LRUMap<K,V>
All Implemented Interfaces:
Serializable, Cloneable, Map<K,V>

public class LRUMap<K,V> extends LinkedHashMap<K,V>
LifoSet - Set interface wrapper around a LinkedList
See Also:
  • Constructor Details

    • LRUMap

      public LRUMap()
    • LRUMap

      public LRUMap(int size)
    • LRUMap

      public LRUMap(int size, int initialCapacity)
    • LRUMap

      public LRUMap(int size, int initialCapacity, float loadFactor)
  • Method Details

    • setMaxSize

      public void setMaxSize(int size)
      Sets the max capacity for this LRUMap
      Parameters:
      size - Max Size (as integer)
    • removeEldestEntry

      protected boolean removeEldestEntry(Map.Entry<K,V> entry)
      Overrides:
      removeEldestEntry in class LinkedHashMap<K,V>