|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object CTL.ObjectMap
public class ObjectMap
Map of objects
Field Summary | |
---|---|
private int |
counter
Number of objects created by this map |
private java.util.LinkedList<ObjectMapEntry> |
list
Underlying LinkedList of ObjectMapEntries |
Constructor Summary | |
---|---|
ObjectMap()
Generate a new map |
Method Summary | |
---|---|
int |
createObj(java.lang.reflect.Constructor c,
java.lang.Object[] args)
Create an object and insert it into the map |
java.lang.String |
dump()
Dump the map's contents to screen |
int |
getCounter()
Retrieve the number of generated objects |
java.lang.Object |
getObj(int hash)
Retrieve an object by ID |
int |
regObj(java.lang.Object obj)
Register a previously constructed object |
int |
regObj(java.lang.Object obj,
int ID)
Register a previously constructed object |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private int counter
private java.util.LinkedList<ObjectMapEntry> list
Constructor Detail |
---|
public ObjectMap()
Method Detail |
---|
public int getCounter()
public int createObj(java.lang.reflect.Constructor c, java.lang.Object[] args) throws java.lang.InstantiationException, java.lang.IllegalAccessException, java.lang.reflect.InvocationTargetException
c
- Constructor to callargs
- Arguments to the constructor
java.lang.InstantiationException
java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetException
public int regObj(java.lang.Object obj)
obj
- Object
public int regObj(java.lang.Object obj, int ID)
obj
- ObjectID
- ID to register the object with
public java.lang.Object getObj(int hash)
hash
- ID
public java.lang.String dump()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |