java.lang.Object
test.LRU
- All Implemented Interfaces:
CacheReplacementPolicy
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
LRU
public LRU()
-
-
Method Details
-
getWords
-
add
The add function adds a word to the list of words.- Specified by:
addin interfaceCacheReplacementPolicy- Parameters:
word- Add a word to the list
-
remove
The remove function removes the first element in the list.- Specified by:
removein interfaceCacheReplacementPolicy- Returns:
- The first element in the set
-