|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object de.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 DBIDFactory
public void deallocateSingleDBID(DBID id)
DBIDFactory
deallocateSingleDBID
in interface DBIDFactory
id
- DBID to deallocatepublic DBIDRange generateStaticDBIDRange(int size)
DBIDFactory
generateStaticDBIDRange
in interface DBIDFactory
size
- Requested size
public void deallocateDBIDRange(DBIDRange range)
DBIDFactory
deallocateDBIDRange
in interface DBIDFactory
range
- Range to deallocatepublic DBID importInteger(int id)
DBIDFactory
importInteger
in interface DBIDFactory
id
- Integer ID to import
public ArrayModifiableDBIDs newArray()
DBIDFactory
newArray
in interface DBIDFactory
public HashSetModifiableDBIDs newHashSet()
DBIDFactory
newHashSet
in interface DBIDFactory
public TreeSetModifiableDBIDs newTreeSet()
DBIDFactory
newTreeSet
in interface DBIDFactory
public ArrayModifiableDBIDs newArray(int size)
DBIDFactory
newArray
in interface DBIDFactory
size
- Size hint
public HashSetModifiableDBIDs newHashSet(int size)
DBIDFactory
newHashSet
in interface DBIDFactory
size
- Size hint
public TreeSetModifiableDBIDs newTreeSet(int size)
DBIDFactory
newTreeSet
in interface DBIDFactory
size
- Size hint
public ArrayModifiableDBIDs newArray(DBIDs existing)
DBIDFactory
newArray
in interface DBIDFactory
existing
- existing DBIDs to use
public HashSetModifiableDBIDs newHashSet(DBIDs existing)
DBIDFactory
newHashSet
in interface DBIDFactory
existing
- existing DBIDs to use
public TreeSetModifiableDBIDs newTreeSet(DBIDs existing)
DBIDFactory
newTreeSet
in interface DBIDFactory
existing
- existing DBIDs to use
public DBIDPair makePair(DBID first, DBID second)
DBIDFactory
makePair
in interface DBIDFactory
first
- first DBIDsecond
- second DBID
public ByteBufferSerializer<DBID> getDBIDSerializer()
DBIDFactory
getDBIDSerializer
in interface DBIDFactory
public FixedSizeByteBufferSerializer<DBID> getDBIDSerializerStatic()
DBIDFactory
getDBIDSerializerStatic
in interface DBIDFactory
public 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 |