
public class UnmodifiableArrayDBIDs extends Object implements ArrayStaticDBIDs
| Modifier and Type | Field and Description |
|---|---|
private ArrayDBIDs |
inner
The DBIDs we wrap.
|
| Constructor and Description |
|---|
UnmodifiableArrayDBIDs(ArrayDBIDs inner)
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)
|
boolean |
isEmpty()
Test for an empty DBID collection.
|
DBIDIter |
iter()
Iterable
|
Iterator<DBID> |
iterator()
Classic iterator.
|
int |
size()
Size of the DBID "collection".
|
String |
toString()
Returns a string representation of the inner DBID collection.
|
private final ArrayDBIDs inner
public UnmodifiableArrayDBIDs(ArrayDBIDs inner)
inner - Inner DBID collection.public boolean contains(DBIDRef o)
DBIDspublic boolean isEmpty()
DBIDspublic Iterator<DBID> iterator()
DBIDspublic DBIDIter iter()
ArrayDBIDsiter in interface ArrayDBIDsiter in interface DBIDspublic int size()
ArrayDBIDssize in interface ArrayDBIDssize in interface DBIDspublic String toString()
public DBID get(int i)
ArrayDBIDsget in interface ArrayDBIDsi - 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