All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.github.bedrin.jdbc.sniffer.util.LruCache Maven / Gradle / Ivy

package com.github.bedrin.jdbc.sniffer.util;

import java.util.LinkedHashMap;
import java.util.Map;

public class LruCache extends LinkedHashMap {

    private final int size;

    public LruCache(int size) {
        super(size, 0.75f, false);
        this.size = size;
    }

    @Override
    protected boolean removeEldestEntry(Map.Entry eldest) {
        return size() > size;
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy