Class TableMap

  • All Implemented Interfaces:
    Serializable, Cloneable, Map
    Direct Known Subclasses:

    public class TableMap
    extends LinkedHashMap
    Usefull class for storing 2-dimensional data that needs to be accessed by it's coordinates. The data structure consist of a Map of Maps of Objects. Inner maps are automatically created when putting values. The datastructure uses LinkedHashMaps, so it is order preserving. Use the getEntrySet() method from Map, to iterate over the objects in the order they were added.
    See Also:
    Serialized Form
    • Constructor Detail

      • TableMap

        public TableMap()
    • Method Detail

      • put

        public void put​(Object outerkey,
                        Object innerkey,
                        Object value)
        Put a value into the tablemap. e.g. put("row1","col2",new Integer(-1));
        outerkey - key of the outer Map
        innerkey - key of the inner Map
        value -
      • get

        public Object get​(Object outerkey,
                          Object innerkey)
        Retrieve an object.
        outerkey -
        innerkey -
        the object at the specified location or null if it doesn't exist.