org.jcon.data
Class ReferenceMap

java.lang.Object
  extended by org.jcon.data.ReferenceMap

public class ReferenceMap
extends java.lang.Object

A mapping of an object to an int ID, used to build goedels for pointer references. Unlike ReferenceList, not designed to do dereferencing (you can just use a regular HashMap for that, brothuh).

Version:
1.0 5/30/2000 Paul's birthday.
Author:
Paul Reavis

Constructor Summary
ReferenceMap()
           
 
Method Summary
 int addReference(java.lang.Object victim)
          Add a new reference.
 boolean contains(java.lang.Object victim)
          Returns true if the object is in the map.
 int refID(java.lang.Object victim)
          Return reference ID of object (-1 if there ain't none)
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ReferenceMap

public ReferenceMap()
Method Detail

addReference

public int addReference(java.lang.Object victim)
Add a new reference. Returns the reference ID.


contains

public boolean contains(java.lang.Object victim)
Returns true if the object is in the map.


refID

public int refID(java.lang.Object victim)
Return reference ID of object (-1 if there ain't none)