uka.util
Class IntSparseIDMap

java.lang.Object
  extended byuka.util.IDConstants
      extended byuka.util.IntSparseIDMap
All Implemented Interfaces:
Printable, java.io.Serializable

public class IntSparseIDMap
extends IDConstants
implements java.io.Serializable, Printable

Author:
Bernhard Haumacher
See Also:
Serialized Form

Field Summary
(package private)  IntIntHashBijection bijection
           
(package private)  IDSpace space
           
 
Fields inherited from class uka.util.IDConstants
FIRST_NEW_ID, FIRST_VALID_ID, INVALID_ID, UNUSED_ID
 
Constructor Summary
IntSparseIDMap(IDSpace space)
           
 
Method Summary
 void appendTo(ToString s)
          This method should append the contents of each instance variable of the current object to the given ToString object.
 void clear()
           
protected  IntIntHashBijection createBijection()
           
 void dump()
           
 int findID(int obj)
           
 int getID(int obj)
           
 int getObject(int id)
           
 int getSize()
           
 boolean isUsed(int id)
           
 void remove(int id)
           
 void resetObject(int id, int obj)
           
 void setObject(int id, int obj)
           
 
Methods inherited from class uka.util.IDConstants
isNew, isValid, normalizeID, toggleNew
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

space

IDSpace space

bijection

IntIntHashBijection bijection
Constructor Detail

IntSparseIDMap

public IntSparseIDMap(IDSpace space)
Method Detail

createBijection

protected IntIntHashBijection createBijection()

getSize

public int getSize()

clear

public void clear()

getID

public int getID(int obj)

findID

public int findID(int obj)

dump

public void dump()

remove

public void remove(int id)

setObject

public void setObject(int id,
                      int obj)

resetObject

public void resetObject(int id,
                        int obj)

isUsed

public final boolean isUsed(int id)

getObject

public int getObject(int id)

appendTo

public void appendTo(ToString s)
Description copied from interface: Printable
This method should append the contents of each instance variable of the current object to the given ToString object. The appended data should be labeled with the name of the corresponding instance variable.

Specified by:
appendTo in interface Printable
See Also:
ToString, ToString.append(String, Object), ToString.append(String, boolean), ToString.append(String, byte), ToString.append(String, int)