ai.evolv.MaxSizeHashMap Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of ascend-sdk Show documentation
Show all versions of ascend-sdk Show documentation
SDK to interact with the Ascend product.
package ai.evolv;
import java.util.LinkedHashMap;
import java.util.Map;
public class MaxSizeHashMap extends LinkedHashMap {
private final int maxSize;
public MaxSizeHashMap(int maxSize) {
this.maxSize = maxSize;
}
@Override
protected boolean removeEldestEntry(Map.Entry eldest) {
return size() > maxSize;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy