BAEL-4464 : how to implement LRU-Cache in java codes added (#11036)
* BAEL-4464 : how to implement LRU-Cache in java codes added * BAEL-4464 : how to implement LRU-Cache in java codes added - package named fixed * BAEL-4464 : how to implement LRU-Cache in java codes added - package named changed * BAEL-4464 : how to implement LRU-Cache in java codes added - unitTest fixed
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
package com.baeldung.lrucache;
|
||||
|
||||
import java.util.Optional;
|
||||
|
||||
public interface Cache<K, V> {
|
||||
boolean put(K key, V value);
|
||||
|
||||
Optional<V> get(K key);
|
||||
|
||||
int size();
|
||||
|
||||
boolean isEmpty();
|
||||
|
||||
void clear();
|
||||
}
|
||||
Reference in New Issue
Block a user