world
Class IdMap

java.lang.Object
  |
  +--java.util.AbstractMap
        |
        +--java.util.TreeMap
              |
              +--world.IdMap
All Implemented Interfaces:
Cloneable, Map, Serializable, SortedMap
Direct Known Subclasses:
RobotMap

public class IdMap
extends TreeMap

Class that implements an ID map.

Version:
$Revision: 1.3 $
Author:
Allen D. Ball
See Also:
ID, Serialized Form

Inner classes inherited from class java.util.TreeMap
TreeMap.Entry
 
Inner classes inherited from class java.util.Map
Map.Entry
 
Constructor Summary
IdMap()
          Creates an ID map.
 
Method Summary
 Object get(int id)
          Gets the object from the map.
 TableModel getTableModel()
          Returns a table model for displaying the IdMap.
 Object put(ID id)
          Puts the object into the map.
 Object remove(int id)
          Removes the object from the map.
 
Methods inherited from class java.util.TreeMap
addAllForTreeSet, clear, clone, comparator, containsKey, containsValue, entrySet, firstKey, get, headMap, keySet, lastKey, put, putAll, readTreeSet, remove, size, subMap, tailMap, values
 
Methods inherited from class java.util.AbstractMap
equals, hashCode, isEmpty, toString
 
Methods inherited from class java.lang.Object
, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.Map
equals, hashCode, isEmpty
 

Constructor Detail

IdMap

public IdMap()
Creates an ID map.
Method Detail

get

public Object get(int id)
Gets the object from the map.
Parameters:
id - The ID of the requested object.

put

public Object put(ID id)
Puts the object into the map.
Parameters:
id - The object to be put into the map.

remove

public Object remove(int id)
Removes the object from the map.
Parameters:
id - The ID of the requested object.

getTableModel

public TableModel getTableModel()
Returns a table model for displaying the IdMap.


Copyright 2002 Allen D. Ball. All rights reserved.