LruCacheImpl<K, V> constructor
LruCacheImpl<K, V> (
- int maxSize
Constructs an LruCacheImpl with the specified maxSize
.
Throws an assertion error if maxSize
is not greater than 0.
Implementation
LruCacheImpl(int maxSize) {
assert(maxSize > 0, 'maxSize must be greater than 0');
this.maxSize = maxSize;
this.map = LinkedHashMap<K, V>();
}