
final class IntegerDBID extends Object implements DBID, IntegerDBIDRef
long, it should not require
 changes in too many places!)
 
 In particular, a developer should not make any assumption of these IDs being
 consistent across multiple results/databases.| Modifier and Type | Class and Description | 
|---|---|
| protected class  | IntegerDBID.DBIDItrPseudo iterator for DBIDs interface. | 
| static class  | IntegerDBID.DynamicSerializerDynamic sized serializer, using varint. | 
| static class  | IntegerDBID.StaticSerializerStatic sized serializer, using regular integers. | 
| Modifier and Type | Field and Description | 
|---|---|
| static ByteBufferSerializer<DBID> | DYNAMIC_SERIALIZERThe public instance to use for dynamic serialization. | 
| protected int | idThe actual object ID. | 
| static FixedSizeByteBufferSerializer<DBID> | STATIC_SERIALIZERThe public instance to use for static serialization. | 
| Modifier | Constructor and Description | 
|---|---|
| protected  | IntegerDBID(int id)Constructor from integer id. | 
| protected  | IntegerDBID(Integer id)Constructor from integer id. | 
| Modifier and Type | Method and Description | 
|---|---|
| void | assign(int index,
      DBIDVar var)Assign a DBID variable the value of position  index. | 
| int | binarySearch(DBIDRef key)Search for the position of the given key, assuming that the data set is
 sorted. | 
| int | compareTo(DBIDRef o)Compare two DBIDs for ordering. | 
| boolean | contains(DBIDRef o)Test whether an ID is contained. | 
| boolean | equals(Object obj)Deprecated.  | 
| DBID | get(int i)Get the i'th entry (starting at 0)
 
 If possible, use an  DBIDArrayIterviaArrayDBIDs.iter()instead! | 
| int | hashCode()In contrast to  DBIDRef, the DBID interface is supposed to have a
 stable hash code. | 
| int | internalGetIndex()Return the integer value of the object ID. | 
| boolean | isEmpty()Test for an empty DBID collection. | 
| DBIDArrayIter | iter()Iterable | 
| int | size()Size of the DBID "collection". | 
| String | toString() | 
protected final int id
public static final ByteBufferSerializer<DBID> DYNAMIC_SERIALIZER
public static final FixedSizeByteBufferSerializer<DBID> STATIC_SERIALIZER
protected IntegerDBID(int id)
id - integer id.protected IntegerDBID(Integer id)
id - integer id.public int internalGetIndex()
internalGetIndex in interface DBIDRefinternalGetIndex in interface IntegerDBIDRefpublic int hashCode()
DBIDDBIDRef, the DBID interface is supposed to have a
 stable hash code. However, it is generally preferred to use optimized
 storage classes instead of Java collections!@Deprecated public boolean equals(Object obj)
DBIDDBIDRef, the DBID interface is supposed to have a
 stable equals for other DBIDs.
 
 Yet, DBIDUtil.equal(de.lmu.ifi.dbs.elki.database.ids.DBIDRef, de.lmu.ifi.dbs.elki.database.ids.DBIDRef) is more type safe and explicit.public int compareTo(DBIDRef o)
DBIDDBIDUtil.compare(de.lmu.ifi.dbs.elki.database.ids.DBIDRef, de.lmu.ifi.dbs.elki.database.ids.DBIDRef), which is more explicit.compareTo in interface DBIDcompareTo in interface Comparable<DBIDRef>o - Other DBID objectpublic DBIDArrayIter iter()
ArrayDBIDsiter in interface ArrayDBIDsiter in interface DBIDspublic DBID get(int i)
ArrayDBIDsDBIDArrayIter via ArrayDBIDs.iter() instead!get in interface ArrayDBIDsi - Indexpublic void assign(int index,
          DBIDVar var)
ArrayDBIDsindex.assign in interface ArrayDBIDsindex - Positionvar - Variable to assign the value to.public boolean contains(DBIDRef o)
DBIDspublic int size()
ArrayDBIDssize in interface ArrayDBIDssize in interface DBIDspublic int binarySearch(DBIDRef key)
ArrayDBIDs-(1+insertion position) is returned, as
 for Java Collections.binarySearch(java.util.List<? extends java.lang.Comparable<? super T>>, T)binarySearch in interface ArrayDBIDskey - Key to search for