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
Constructor Summary |
IdMap()
Creates an ID 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 |
IdMap
public IdMap()
- Creates an ID map.
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.