Class Index | File Index

Classes


Class TreeMap


Defined in: treemap.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
TreeMap(comparator)
Tree Map
Field Summary
Field Attributes Field Name and Description
 
Remove all the mapping entries from this map.
<inner> <constant>  
 
Return the comparasion function used in this map
 
put
Associate the specified value with the specified key in this map.
 
Return the number of key-value mapping in this map
Method Summary
Method Attributes Method Name and Description
<inner>  
AscendingSubMap(m, fromStart, lo, loInclusive, toEnd, hi, hiInclusive)
 
 
<inner>  
<inner>  
 
Returns true if this map contains a mapping entry for the given key
<inner>  
<inner>  
DescendingSubMap(m, fromStart, lo, loInclusive, toEnd, hi, hiInclusive)
<inner>  
Entry(key, value, parent)
<inner>  
 
Get the first entry in this map
 
Get the first key in this map
<inner>  
<inner>  
 
 
floorKey(key)
 
get(key)
Get the value to which the specified key is mapped, or null if this map contains no mapping for the key
<inner>  
<inner>  
<inner>  
getEntry(key)
Return the map entry of the given key, or null if the map does not contain an entry for the key.
<inner>  
<inner>  
<inner>  
<inner>  
<inner>  
 
headMap(toKey, toInclusive)
 
 
higherKey(key)
<inner>  
key(e)
<inner>  
 
Get the last entry in this map
 
Get the last key in this map
<inner>  
leftOf(p)
 
Get the largest entry whose key is lower than the specified key.
 
lowerKey(key)
Get the largest entry's whose key is lower than the specified key.
<inner>  
 
Get the first entry and remove it
 
Get the last entry and remove it
<inner>  
<inner>  
put(key, value)
 
remove(key)
Removes the mapping entry for this key from this map if present.
<inner>  
<inner>  
<inner>  
<inner>  
setColor(p, color)
<inner>  
size()
 
subMap(fromKey, fromInclusive, toKey, toInclusive)
<inner>  
 
tailMap(fromKey, inclusive)
Class Detail
TreeMap(comparator)
Tree Map
Author: Sijie Guo .
Parameters:
{Function} comparator
comparasion function
Field Detail
clear
Remove all the mapping entries from this map.

<inner> <constant> COLOR

comparator
Return the comparasion function used in this map

put
Associate the specified value with the specified key in this map. If the map previously contained a mapping entry for the key, the old value is replaced.

size
Return the number of key-value mapping in this map
Method Detail
<inner> AscendingSubMap(m, fromStart, lo, loInclusive, toEnd, hi, hiInclusive)
Parameters:
m
fromStart
lo
loInclusive
toEnd
hi
hiInclusive

ceilingEntry(key)
Parameters:
key

ceilingKey(key)
Parameters:
key

<inner> clear()

<inner> colorOf(p)
Parameters:
p

containsKey(key)
Returns true if this map contains a mapping entry for the given key
Parameters:
{Object} key
whose presence in this map is to be tested
Returns:
true if this map contains a mapping entry for the given key

<inner> deleteEntry(p)
Parameters:
p

<inner> DescendingSubMap(m, fromStart, lo, loInclusive, toEnd, hi, hiInclusive)
Parameters:
m
fromStart
lo
loInclusive
toEnd
hi
hiInclusive

<inner> Entry(key, value, parent)
Parameters:
key
value
parent

<inner> exportEntry(p)
Parameters:
p

firstEntry()
Get the first entry in this map
Returns:
the first entry

firstKey()
Get the first key in this map
Returns:
the first key

<inner> fixAfterDeletion(x)
Parameters:
x

<inner> fixAfterInsertion(x)
Parameters:
x

floorEntry(key)
Parameters:
key

floorKey(key)
Parameters:
key

get(key)
Get the value to which the specified key is mapped, or null if this map contains no mapping for the key
Parameters:
{Object} key
the query key
Returns:
the value or null

<inner> getCeilingEntry(key)
Parameters:
key

<inner> getComparator()

<inner> getEntry(key)
Return the map entry of the given key, or null if the map does not contain an entry for the key.
Parameters:
{Object} key
given query key
Returns:
the map entry of the given key, or null if the map does not contain an entry for the key

<inner> getFirstEntry()

<inner> getFloorEntry(key)
Parameters:
key

<inner> getHigherEntry(key)
Parameters:
key

<inner> getLastEntry()

<inner> getLowerEntry(key)
Parameters:
key

headMap(toKey, toInclusive)
Parameters:
toKey
toInclusive

higherEntry(key)
Parameters:
key

higherKey(key)
Parameters:
key

<inner> key(e)
Parameters:
e

<inner> keyOrNull(e)
Parameters:
e

lastEntry()
Get the last entry in this map
Returns:
the last entry

lastKey()
Get the last key in this map
Returns:
the last key

<inner> leftOf(p)
Parameters:
p

lowerEntry(key)
Get the largest entry whose key is lower than the specified key.
Parameters:
{Object} key
the specified key
Returns:
lower entry

lowerKey(key)
Get the largest entry's whose key is lower than the specified key.
Parameters:
{Object} key
the specfied key
Returns:
lower key

<inner> parentOf(p)
Parameters:
p

pollFirstEntry()
Get the first entry and remove it
Returns:
the first entry

pollLastEntry()
Get the last entry and remove it
Returns:
the last entry

<inner> predecessor(p)
Parameters:
p

<inner> put(key, value)
Parameters:
key
value

remove(key)
Removes the mapping entry for this key from this map if present.
Parameters:
{Object} key
key for which mapping should be removed
Returns:
the previous value associated with key, or null if there was no mapping entry for this key.

<inner> rightOf(p)
Parameters:
p

<inner> rotateLeft(p)
Parameters:
p

<inner> rotateRight(p)
Parameters:
p

<inner> setColor(p, color)
Parameters:
p
color

<inner> size()

subMap(fromKey, fromInclusive, toKey, toInclusive)
Parameters:
fromKey
fromInclusive
toKey
toInclusive

<inner> successor(p)
Parameters:
p

tailMap(fromKey, inclusive)
Parameters:
fromKey
inclusive

Documentation generated by JsDoc Toolkit 2.4.0 on Wed Mar 09 2011 23:15:16 GMT+0800 (CST)