Example usage for org.apache.commons.collections15.map LRUMap LRUMap

List of usage examples for org.apache.commons.collections15.map LRUMap LRUMap

Introduction

In this page you can find the example usage for org.apache.commons.collections15.map LRUMap LRUMap.

Prototype

public LRUMap(Map<? extends K, ? extends V> map, boolean scanUntilRemovable) 

Source Link

Document

Constructor copying elements from another map.

Usage

From source file:com.memetix.translate.LRUCache.java

public LRUCache(int maxSize) {
    //Defaults to Scan Until Removable when LRUMap is Full
    map = Collections.synchronizedMap(new LRUMap<Object, Object>(maxSize, true));
}

From source file:com.memetix.translate.LRUCache.java

public LRUCache(int maxSize, boolean scanUntilRemovable) {
    map = Collections.synchronizedMap(new LRUMap<Object, Object>(maxSize, scanUntilRemovable));
}