nl.gx.webmanager.handler.util
Class ThreeDimMap

java.lang.Object
  extended by java.util.AbstractMap<K,V>
      extended by java.util.HashMap<K,V>
          extended by java.util.LinkedHashMap
              extended by nl.gx.webmanager.handler.util.TableMap
                  extended by nl.gx.webmanager.handler.util.ThreeDimMap
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, java.util.Map

public class ThreeDimMap
extends TableMap

A trivial extension of the TableMap to support threedimensional data storage. This class uses its parent 2D dimensional storage to store the third dimension in another map. Note for four, five, six, ... dimensional datastructures, this class can be extended once more. Additionally a n dimensional storage facility could be created by creating a recursive subclass of Map that uses a list of keys.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class java.util.AbstractMap
java.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V>
 
Constructor Summary
ThreeDimMap()
           
 
Method Summary
 java.lang.Object get(java.lang.Object firstdimension, java.lang.Object seconddimension, java.lang.Object thirddimension)
           
 void put(java.lang.Object firstdimension, java.lang.Object seconddimension, java.lang.Object thirddimension, java.lang.Object value)
          Stores a value at the provided coordinates.
 
Methods inherited from class nl.gx.webmanager.handler.util.TableMap
get, put
 
Methods inherited from class java.util.LinkedHashMap
clear, containsValue, get, removeEldestEntry
 
Methods inherited from class java.util.HashMap
clone, containsKey, entrySet, isEmpty, keySet, put, putAll, remove, size, values
 
Methods inherited from class java.util.AbstractMap
equals, hashCode, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.Map
containsKey, entrySet, equals, hashCode, isEmpty, keySet, put, putAll, remove, size, values
 

Constructor Detail

ThreeDimMap

public ThreeDimMap()
Method Detail

get

public java.lang.Object get(java.lang.Object firstdimension,
                            java.lang.Object seconddimension,
                            java.lang.Object thirddimension)
Parameters:
firstdimension -
seconddimension -
thirddimension -
Returns:
the object stored at the provided at the coordinates or null if it does not exist

put

public void put(java.lang.Object firstdimension,
                java.lang.Object seconddimension,
                java.lang.Object thirddimension,
                java.lang.Object value)
Stores a value at the provided coordinates.

Parameters:
firstdimension -
seconddimension -
thirddimension -
value -


Copyright © 2007-2011 GX Software BV. All Rights Reserved.