Packagecom.threerings.util.maps
Classpublic class SortedMap
InheritanceSortedMap Inheritance com.threerings.util.maps.ForwardingMap

A sorted Map implementation. Note that the sorting is performed when you iterate over the map, the internal representation is not sorted. Thus, it does not offer performance benefits, it is merely a convenience class.



Public Methods
 MethodDefined by
  
SortedMap(source:Map, comp:Function = null)
Construct a SortedMap.
SortedMap
  
forEach(fn:Function):void
Call the specified function to iterate over the mappings in this Map.
SortedMap
  
keys():Array
Return all the unique keys in this Map, in Array form.
SortedMap
  
values():Array
Return all the values in this Map, in Array form.
SortedMap
Constructor detail
SortedMap()constructor
public function SortedMap(source:Map, comp:Function = null)

Construct a SortedMap.

Parameters
source:Map — the backing Map
 
comp:Function (default = null) — the Comparator used to sort the keys, or null to use Comparators.compareUnknown.
Method detail
forEach()method
public override function forEach(fn:Function):void

Call the specified function to iterate over the mappings in this Map. Signature: function (key :Object, value :Object) :void or function (key :Object, value :Object) :Boolean If you return a Boolean, you may return true to indicate that you've found what you were looking for, and halt iteration.

Parameters
fn:Function
keys()method 
public override function keys():Array

Return all the unique keys in this Map, in Array form. The Array is not a 'view': it can be modified without disturbing the Map from whence it came.

Returns
Array
values()method 
public override function values():Array

Return all the values in this Map, in Array form. The Array is not a 'view': it can be modified without disturbing the Map from whence it came.

Returns
Array