Skip to content

Commit dcdd17d

Browse files
Merge pull request TheAlgorithms#1433 from abhijaykumar/Development
Added LinkedHashMap cache type params to avoid build error
2 parents 84914c8 + dd3b2d2 commit dcdd17d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/com/caching/LRUCache.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public LRUCache(int capacity) {
3636
*
3737
* @param accessOrder - Set to true if ordering mode is specified (removeEldestEntry).
3838
*/
39-
this.cache = new LinkedHashMap<>(capacity, 1.0f, true) {
39+
this.cache = new LinkedHashMap<Integer, T>(capacity, 1.0f, true) {
4040
/**
4141
* @param eldest - The least recently accessed entry This is the entry that will
4242
* be removed if the method returns {@code true}.

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy