Packageorg.servebox.commons.map
Classpublic class SortedDictionaryTable
InheritanceSortedDictionaryTable Inheritance DictionaryTable
ImplementsISortedMap

SortedDictionartTable return elements sorted by keys. As in a DictionaryTable keys are String instances, the natural sort order is used. You also may provide your own IComparator to sort the keys.



Protected Properties
 PropertyDefined by
 Inherited_internalDict : Object
Storage object.
DictionaryTable
 Inherited_keys : Array
Keys cache.
DictionaryTable
Public Methods
 MethodDefined by
  
Creates a new SortedDictionaryTable object.
SortedDictionaryTable
 Inherited
clear():void
Removes all mappings from this map (optional operation).
DictionaryTable
 Inherited
Creates a shallow copy of this hashtable.
DictionaryTable
  
Returns the comparator object.
SortedDictionaryTable
 Inherited
contains(value:IBasicObject):Boolean
DictionaryTable
 Inherited
containsKey(key:Object):Boolean
Returns true if this map contains a mapping for the specified key.
DictionaryTable
 Inherited
containsValue(value:IBasicObject):Boolean
Returns true if this map maps one or more keys to the specified value.
DictionaryTable
 Inherited
elements():Array
DictionaryTable
 Inherited
equals(value:IBasicObject):Boolean
Compares the specified Object with this Map for equality, as per the definition in the Map interface.
DictionaryTable
  
firstKey():Object
Returns the first key in the sorted map.
SortedDictionaryTable
 Inherited
get(key:Object):IBasicObject
DictionaryTable
 Inherited
getKey(value:Object):String
Return the key for the value
DictionaryTable
 Inherited
hashCode():int
Returns the hashcode of the object.
DictionaryTable
  
headMap(toKey:String):ISortedMap
Retrieves the part of this map whose keys are strictly less than toKey.
SortedDictionaryTable
 Inherited
isEmpty():Boolean
Tests if this dictionary maps no keys to value.
DictionaryTable
  
keys():Array
Returns an Array of the keys in this dictionary.
SortedDictionaryTable
 Inherited
keySet():Array
Returns a view of the keys contained in this map.
DictionaryTable
  
lastKey():Object
Returns the last key in the sorted map.
SortedDictionaryTable
  
needleMap(neededKeys:Array):IMap
Copies the key/values pair using the specified set of keys to a new map instance.
SortedDictionaryTable
 Inherited
put(key:Object, value:IBasicObject):Object
Maps the specified key to the specified value in this dictionary.
The DictionaryTable uses String instances as keys.
DictionaryTable
 Inherited
putAll(t:IMap):void
Copies all of the mappings from the specified Map to this Hashtable These mappings will replace any mappings that this Hashtable had for any of the keys currently in the specified Map.
DictionaryTable
 Inherited
remove(key:Object):Object
Removes the key (and its corresponding value) from this dictionary.
DictionaryTable
 Inherited
size():int
Returns the number of entries (distinct keys) in this dictionary.
DictionaryTable
  
subMap(fromKey:String, toKey:String):ISortedMap
Retrieves the part of this map whose keys range from fromKey, inclusive, to toKey, exclusive.
SortedDictionaryTable
  
tailMap(fromKey:String):ISortedMap
Retrieves the part of this map whose keys are greater than or equal to fromKey.
SortedDictionaryTable
 Inherited
toString():String
Returns the string representation of the specified object.
DictionaryTable
 Inherited
values():Array
Returns a collection view of the values contained in this map.
DictionaryTable
Constructor detail
SortedDictionaryTable()constructor
public function SortedDictionaryTable(dt:DictionaryTable = null, comp:IComparator = null)

Creates a new SortedDictionaryTable object.

Parameters
dt:DictionaryTable (default = null)
 
comp:IComparator (default = null)
Method detail
comparator()method
public function comparator():IComparator

Returns the comparator object.

Returns
IComparator
firstKey()method 
public function firstKey():Object

Returns the first key in the sorted map.

Returns
Object
headMap()method 
public function headMap(toKey:String):ISortedMap

Retrieves the part of this map whose keys are strictly less than toKey.

Parameters
toKey:String

Returns
ISortedMap
keys()method 
public override function keys():Array

Returns an Array of the keys in this dictionary.

Returns
Array
lastKey()method 
public function lastKey():Object

Returns the last key in the sorted map.

Returns
Object
needleMap()method 
public override function needleMap(neededKeys:Array):IMap

Copies the key/values pair using the specified set of keys to a new map instance.

Parameters
neededKeys:Array

Returns
IMap
subMap()method 
public function subMap(fromKey:String, toKey:String):ISortedMap

Retrieves the part of this map whose keys range from fromKey, inclusive, to toKey, exclusive.

Parameters
fromKey:String
 
toKey:String

Returns
ISortedMap
tailMap()method 
public function tailMap(fromKey:String):ISortedMap

Retrieves the part of this map whose keys are greater than or equal to fromKey.

Parameters
fromKey:String

Returns
ISortedMap