Packagecom.threerings.util.maps
Classpublic class LRMap
InheritanceLRMap Inheritance com.threerings.util.maps.LinkedMap

A Map that disposes of key/value mappings that were least-recently used or inserted after filling up. Re-inserting a value for a key updates the ordering. Note: this implementation is O(n) for maintaining the ordering. This was done (rather than using a linked map implementation) because it was easy, it works with a HashMap or DictionaryMap underneath, and we don't really need more. Does not work with a weak-value map as the source.



Public Methods
 MethodDefined by
  
LRMap(source:Map, maxSize:int, accessOrder:Boolean = true)
LRMap
  
put(key:Object, value:Object):*
LRMap
Constructor detail
LRMap()constructor
public function LRMap(source:Map, maxSize:int, accessOrder:Boolean = true)Parameters
source:Map
 
maxSize:int
 
accessOrder:Boolean (default = true)
Method detail
put()method
public override function put(key:Object, value:Object):*

Parameters
key:Object
 
value:Object

Returns
*