uka.util
Class SparseIDSpace

java.lang.Object
  extended byuka.util.SparseIDSpace
All Implemented Interfaces:
IDSpace, java.io.Serializable
Direct Known Subclasses:
PartitionedIDSpace

public class SparseIDSpace
extends java.lang.Object
implements IDSpace, java.io.Serializable

See Also:
Serialized Form

Field Summary
protected  int nextID
           
protected  IntSet usedIDs
           
 
Constructor Summary
SparseIDSpace()
           
 
Method Summary
 void clear()
           
 int create()
           
 void create(int id)
           
 IntIterator getUsedIDs()
           
 boolean isUsed(int id)
           
 void remove(int id)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

nextID

protected int nextID

usedIDs

protected IntSet usedIDs
Constructor Detail

SparseIDSpace

public SparseIDSpace()
Method Detail

create

public int create()
Specified by:
create in interface IDSpace

create

public void create(int id)
Specified by:
create in interface IDSpace

remove

public void remove(int id)
Specified by:
remove in interface IDSpace

getUsedIDs

public IntIterator getUsedIDs()
Specified by:
getUsedIDs in interface IDSpace

isUsed

public boolean isUsed(int id)
Specified by:
isUsed in interface IDSpace

clear

public void clear()
Specified by:
clear in interface IDSpace