|
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.util.AbstractCollection<E>
java.util.AbstractList<DBID>
de.lmu.ifi.dbs.elki.database.ids.integer.IntegerDBID
class IntegerDBID

Database ID object.
While this currently is just an Integer, it should be avoided to store the
object IDs in regular integers to reduce problems if this API ever changes
(for example if someone needs to support 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.
| Nested Class Summary | |
|---|---|
static class |
IntegerDBID.DynamicSerializer
Dynamic sized serializer, using varint. |
protected class |
IntegerDBID.Itr
Pseudo iterator for DBIDs interface. |
static class |
IntegerDBID.StaticSerializer
Static sized serializer, using regular integers. |
| Field Summary | |
|---|---|
static IntegerDBID.DynamicSerializer |
dynamicSerializer
The public instance to use for dynamic serialization. |
protected int |
id
The actual object ID. |
static IntegerDBID.StaticSerializer |
staticSerializer
The public instance to use for static serialization. |
| Fields inherited from class java.util.AbstractList |
|---|
modCount |
| Constructor Summary | |
|---|---|
protected |
IntegerDBID(int id)
Constructor from integer id. |
protected |
IntegerDBID(Integer id)
Constructor from integer id. |
| Method Summary | |
|---|---|
Collection<DBID> |
asCollection()
Retrieve collection access to the IDs |
int |
compareTo(DBID o)
|
boolean |
contains(Object o)
Test whether an ID is contained. |
boolean |
equals(Object obj)
|
DBID |
get(int i)
|
int |
getIntegerID()
Return the integer value of the object ID. |
int |
hashCode()
|
boolean |
isEmpty()
Test for an empty DBID collection. |
Iterator<DBID> |
iterator()
Retrieve Iterator access to the IDs. |
int |
size()
Retrieve the collection / data size. |
String |
toString()
|
| Methods inherited from class java.util.AbstractList |
|---|
add, add, addAll, clear, indexOf, lastIndexOf, listIterator, listIterator, remove, removeRange, set, subList |
| Methods inherited from class java.util.AbstractCollection |
|---|
addAll, containsAll, remove, removeAll, retainAll, toArray, toArray |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface java.util.List |
|---|
add, add, addAll, addAll, clear, containsAll, indexOf, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, retainAll, set, subList, toArray, toArray |
| Field Detail |
|---|
protected final int id
public static final IntegerDBID.DynamicSerializer dynamicSerializer
public static final IntegerDBID.StaticSerializer staticSerializer
| Constructor Detail |
|---|
protected IntegerDBID(int id)
id - integer id.protected IntegerDBID(Integer id)
id - integer id.| Method Detail |
|---|
public int getIntegerID()
getIntegerID in interface DBIDpublic String toString()
toString in class AbstractCollection<DBID>public int hashCode()
hashCode in interface Collection<DBID>hashCode in interface List<DBID>hashCode in class AbstractList<DBID>public boolean equals(Object obj)
equals in interface Collection<DBID>equals in interface List<DBID>equals in class AbstractList<DBID>public int compareTo(DBID o)
compareTo in interface Comparable<DBID>public Collection<DBID> asCollection()
DBIDs
asCollection in interface DBIDspublic boolean contains(Object o)
DBIDsCollection.
contains in interface DBIDscontains in interface Collection<DBID>contains in interface List<DBID>contains in class AbstractCollection<DBID>o - object to test
public Iterator<DBID> iterator()
DBIDs
iterator in interface DBIDsiterator in interface Iterable<DBID>iterator in interface Collection<DBID>iterator in interface List<DBID>iterator in class AbstractList<DBID>public int size()
DBIDs
size in interface DBIDssize in interface Collection<DBID>size in interface List<DBID>size in class AbstractCollection<DBID>public boolean isEmpty()
DBIDs
isEmpty in interface DBIDsisEmpty in interface Collection<DBID>isEmpty in interface List<DBID>isEmpty in class AbstractCollection<DBID>public DBID get(int i)
get in interface List<DBID>get in class AbstractList<DBID>
|
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||