Packageorg.servebox.commons.map
Interfacepublic interface ISortedMap extends IMap, IBasicObject
ImplementorsSortedDictionaryTable

A Map providing ordering on its keys. The map is ordered by an IComparator instance or, if there is no IComparator provided, according to the natural order of the keys.



Public Methods
 MethodDefined by
 Inherited
clear():void
Removes all mappings from this map (optional operation).
IMap
  
Returns the comparator object.
ISortedMap
 Inherited
containsKey(key:Object):Boolean
Returns true if this map contains a mapping for the specified key.
IMap
 Inherited
containsValue(value:IBasicObject):Boolean
Returns true if this map maps one or more keys to the specified value.
IMap
 Inherited
equals(value:IBasicObject):Boolean
Object comparison mechanism.
IBasicObject
  
firstKey():Object
Returns the first key in the sorted map.
ISortedMap
 Inherited
get(key:Object):IBasicObject
Returns the value to which this map maps the specified key.
IMap
 Inherited
hashCode():int
Returns the hashcode of the object.
IBasicObject
  
headMap(toKey:String):ISortedMap
Retrieves the part of this map whose keys are strictly less than toKey.
ISortedMap
 Inherited
isEmpty():Boolean
Returns true if this map contains no key-value mappings.
IMap
 Inherited
keys():Array
Returns a view of the keys contained in this map.
IMap
 Inherited
keySet():Array
Returns a view of the keys contained in this map.
IMap
  
lastKey():Object
Returns the last key in the sorted map.
ISortedMap
 Inherited
needleMap(neededKeys:Array):IMap
Copies the key/values pair using the specified set of keys to a new map instance.
IMap
 Inherited
put(key:Object, v:IBasicObject):Object
Associates the specified value with the specified key in this map (optional operation).
IMap
 Inherited
putAll(t:IMap):void
Copies all of the mappings from the specified map to this map (optional operation).
IMap
 Inherited
remove(key:Object):Object
Removes the mapping for this key from this map if present (optional operation).
IMap
 Inherited
size():int
Returns the number of key-value mappings in this map.
IMap
  
subMap(fromKey:String, toKey:String):ISortedMap
Retrieves the part of this map whose keys range from fromKey, inclusive, to toKey, exclusive.
ISortedMap
  
tailMap(fromKey:String):ISortedMap
Retrieves the part of this map whose keys are greater than or equal to fromKey.
ISortedMap
 Inherited
toString():String
Returns the string representation of the specified object.
IBasicObject
 Inherited
values():Array
Returns a collection view of the values contained in this map.
IMap
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
lastKey()method 
public function lastKey():Object

Returns the last key in the sorted map.

Returns
Object
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