
public class IntegerArrayStaticDBIDs extends AbstractList<DBID> implements ArrayStaticDBIDs
| Modifier and Type | Class and Description |
|---|---|
protected class |
IntegerArrayStaticDBIDs.DBIDItr
DBID iterator in ELKI/C style.
|
protected class |
IntegerArrayStaticDBIDs.Itr
Iterator class.
|
| Modifier and Type | Field and Description |
|---|---|
protected int[] |
ids
The actual storage.
|
modCount| Constructor and Description |
|---|
IntegerArrayStaticDBIDs(int... ids)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
int |
binarySearch(DBIDRef key)
Search for the position of the given key, assuming that the data set is
sorted.
|
boolean |
contains(DBIDRef o)
Test whether an ID is contained.
|
DBID |
get(int i)
Get the i'th entry (starting at 0)
|
DBIDIter |
iter()
Iterable
|
Iterator<DBID> |
iterator()
Classic iterator.
|
int |
size()
Size of the DBID "collection".
|
<T> T[] |
toArray(T[] a) |
add, add, addAll, clear, equals, hashCode, indexOf, lastIndexOf, listIterator, listIterator, remove, removeRange, set, subListaddAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toStringpublic IntegerArrayStaticDBIDs(int... ids)
ids - Array of ids.public Iterator<DBID> iterator()
DBIDspublic DBIDIter iter()
ArrayDBIDsiter in interface ArrayDBIDsiter in interface DBIDspublic int size()
ArrayDBIDssize in interface ArrayDBIDssize in interface DBIDssize in interface Collection<DBID>size in interface List<DBID>size in class AbstractCollection<DBID>public boolean contains(DBIDRef o)
DBIDspublic <T> T[] toArray(T[] a)
toArray in interface Collection<DBID>toArray in interface List<DBID>toArray in class AbstractCollection<DBID>public DBID get(int i)
ArrayDBIDsget in interface ArrayDBIDsget in interface List<DBID>get in class AbstractList<DBID>i - Indexpublic 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