com.olapdb.core.utils.LruCache Maven / Gradle / Ivy
The newest version!
package com.olapdb.core.utils;
import java.util.LinkedHashMap;
import java.util.Map;
public class LruCache extends LinkedHashMap {
private int capacity;
public LruCache(int capacity) {
super(100, 0.75f, true);
this.capacity = capacity;
}
@Override
protected boolean removeEldestEntry(Map.Entry eldest) {
return size() > capacity;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy