public class TreeMap2D<K1 extends java.lang.Comparable,K2 extends java.lang.Comparable,V> extends java.lang.Object implements Map2D<K1,K2,V>
The two dimensional tree map is implemented as a tree map of tree maps. Each "row" key points to a "column" tree map.
Example of use:
Map2D map = new TreeMap2D(); map.put( "a" , "b" , "my value" ); String s = map.get( "a" , "b" );
Note: TreeMap2D does not implement the Map interface.
| Modifier and Type | Field and Description | 
|---|---|
| protected java.util.Map<K1,java.util.TreeMap<K2,V>> | localMapLocal map. | 
| Constructor and Description | 
|---|
| TreeMap2D()Create two dimensional tree map. | 
| Modifier and Type | Method and Description | 
|---|---|
| void | clear()Clear all entries from this map and its child maps. | 
| java.util.Set<K2> | columnKeySet()Get column  key set. | 
| java.util.Set<K2> | columnKeySet(java.lang.Object rowKey)Get column  key set for given row key. | 
| boolean | containsKey(CompoundKey key)Determine if map contains a compound key. | 
| boolean | containsKeys(java.lang.Object rowKey,
            java.lang.Object columnKey)Determine if map contains a key pair. | 
| V | get(CompoundKey key)Get value at specified CompoundKey position. | 
| V | get(java.lang.Object rowKey,
   java.lang.Object columnKey)Get value at specified (rowKey, columnKey) position. | 
| java.util.Set<CompoundKey> | keySet()Get the compound key set. | 
| V | put(K1 rowKey,
   K2 columnKey,
   V value)Add value for specified (rowKey, columnKey) . | 
| V | remove(java.lang.Object rowKey,
      java.lang.Object columnKey)Remove entry at (rowKey, columnKey). | 
| java.util.Set<K1> | rowKeySet()Get row key set. | 
| int | size()Return number of entries. | 
| java.lang.String | toString()Return formatted string displaying all entries. | 
public void clear()
public int size()
public boolean containsKeys(java.lang.Object rowKey,
                   java.lang.Object columnKey)
containsKeys in interface Map2D<K1 extends java.lang.Comparable,K2 extends java.lang.Comparable,V>rowKey - Row key.columnKey - Column key.public boolean containsKey(CompoundKey key)
containsKey in interface Map2D<K1 extends java.lang.Comparable,K2 extends java.lang.Comparable,V>key - Compound key.public V get(java.lang.Object rowKey, java.lang.Object columnKey)
public V get(CompoundKey key)
public V remove(java.lang.Object rowKey, java.lang.Object columnKey)
public java.util.Set<CompoundKey> keySet()
public java.util.Set<K1> rowKeySet()
public java.util.Set<K2> columnKeySet()
columnKeySet in interface Map2D<K1 extends java.lang.Comparable,K2 extends java.lang.Comparable,V>public java.util.Set<K2> columnKeySet(java.lang.Object rowKey)
columnKeySet in interface Map2D<K1 extends java.lang.Comparable,K2 extends java.lang.Comparable,V>rowKey - The row key.public java.lang.String toString()
toString in class java.lang.Object