Added cache type params to avoid build error on jdk8

This commit is contained in:
Abhijay Kumar 2020-08-25 17:42:24 +05:30
parent 2d797fb976
commit 60c77e5730

View File

@ -36,7 +36,7 @@ public class LRUCache<T> {
*
* @param accessOrder - Set to true if ordering mode is specified (removeEldestEntry).
*/
this.cache = new LinkedHashMap<>(capacity, 1.0f, true) {
this.cache = new LinkedHashMap<Integer, T>(capacity, 1.0f, true) {
/**
* @param eldest - The least recently accessed entry This is the entry that will
* be removed if the method returns {@code true}.