|
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectde.lmu.ifi.dbs.elki.database.ids.integer.TrivialDBIDFactory
public class TrivialDBIDFactory

Trivial DBID management, that never reuses IDs and just gives them out in sequence. Statically allocated DBID ranges are given positive values, Dynamically allocated DBIDs are given negative values.
| Field Summary | |
|---|---|
(package private) AtomicInteger |
next
Keep track of the smallest dynamic DBID offset not used |
| Fields inherited from interface de.lmu.ifi.dbs.elki.database.ids.DBIDFactory |
|---|
FACTORY |
| Constructor Summary | |
|---|---|
TrivialDBIDFactory()
Constructor |
|
| Method Summary | |
|---|---|
void |
deallocateDBIDRange(DBIDRange range)
Deallocate a static DBID range. |
void |
deallocateSingleDBID(DBID id)
Return a single DBID for reuse. |
DBID |
generateSingleDBID()
Generate a single DBID |
DBIDRange |
generateStaticDBIDRange(int size)
Generate a static DBID range. |
ByteBufferSerializer<DBID> |
getDBIDSerializer()
Get a serializer for DBIDs |
FixedSizeByteBufferSerializer<DBID> |
getDBIDSerializerStatic()
Get a serializer for DBIDs with static size |
Class<? extends DBID> |
getTypeRestriction()
Get type restriction |
DBID |
importInteger(int id)
Import an integer ID |
DBIDPair |
makePair(DBID first,
DBID second)
Make a DBID pair from two existing DBIDs. |
ArrayModifiableDBIDs |
newArray()
Make a new (modifiable) array of DBIDs. |
ArrayModifiableDBIDs |
newArray(DBIDs existing)
Make a new (modifiable) array of DBIDs. |
ArrayModifiableDBIDs |
newArray(int size)
Make a new (modifiable) array of DBIDs. |
HashSetModifiableDBIDs |
newHashSet()
Make a new (modifiable) hash set of DBIDs. |
HashSetModifiableDBIDs |
newHashSet(DBIDs existing)
Make a new (modifiable) hash set of DBIDs. |
HashSetModifiableDBIDs |
newHashSet(int size)
Make a new (modifiable) hash set of DBIDs. |
TreeSetModifiableDBIDs |
newTreeSet()
Make a new (modifiable) tree set of DBIDs. |
TreeSetModifiableDBIDs |
newTreeSet(DBIDs existing)
Make a new (modifiable) tree set of DBIDs. |
TreeSetModifiableDBIDs |
newTreeSet(int size)
Make a new (modifiable) tree set of DBIDs. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
AtomicInteger next
| Constructor Detail |
|---|
public TrivialDBIDFactory()
| Method Detail |
|---|
public DBID generateSingleDBID()
DBIDFactory
generateSingleDBID in interface DBIDFactorypublic void deallocateSingleDBID(DBID id)
DBIDFactory
deallocateSingleDBID in interface DBIDFactoryid - DBID to deallocatepublic DBIDRange generateStaticDBIDRange(int size)
DBIDFactory
generateStaticDBIDRange in interface DBIDFactorysize - Requested size
public void deallocateDBIDRange(DBIDRange range)
DBIDFactory
deallocateDBIDRange in interface DBIDFactoryrange - Range to deallocatepublic DBID importInteger(int id)
DBIDFactory
importInteger in interface DBIDFactoryid - Integer ID to import
public ArrayModifiableDBIDs newArray()
DBIDFactory
newArray in interface DBIDFactorypublic HashSetModifiableDBIDs newHashSet()
DBIDFactory
newHashSet in interface DBIDFactorypublic TreeSetModifiableDBIDs newTreeSet()
DBIDFactory
newTreeSet in interface DBIDFactorypublic ArrayModifiableDBIDs newArray(int size)
DBIDFactory
newArray in interface DBIDFactorysize - Size hint
public HashSetModifiableDBIDs newHashSet(int size)
DBIDFactory
newHashSet in interface DBIDFactorysize - Size hint
public TreeSetModifiableDBIDs newTreeSet(int size)
DBIDFactory
newTreeSet in interface DBIDFactorysize - Size hint
public ArrayModifiableDBIDs newArray(DBIDs existing)
DBIDFactory
newArray in interface DBIDFactoryexisting - existing DBIDs to use
public HashSetModifiableDBIDs newHashSet(DBIDs existing)
DBIDFactory
newHashSet in interface DBIDFactoryexisting - existing DBIDs to use
public TreeSetModifiableDBIDs newTreeSet(DBIDs existing)
DBIDFactory
newTreeSet in interface DBIDFactoryexisting - existing DBIDs to use
public DBIDPair makePair(DBID first,
DBID second)
DBIDFactory
makePair in interface DBIDFactoryfirst - first DBIDsecond - second DBID
public ByteBufferSerializer<DBID> getDBIDSerializer()
DBIDFactory
getDBIDSerializer in interface DBIDFactorypublic FixedSizeByteBufferSerializer<DBID> getDBIDSerializerStatic()
DBIDFactory
getDBIDSerializerStatic in interface DBIDFactorypublic Class<? extends DBID> getTypeRestriction()
DBIDFactory
getTypeRestriction in interface DBIDFactory
|
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||