Package elki.database.ids.integer
Class UnmodifiableIntegerDBIDs
- java.lang.Object
-
- elki.database.ids.integer.UnmodifiableIntegerDBIDs
-
- All Implemented Interfaces:
DBIDs
,IntegerDBIDs
,StaticDBIDs
public class UnmodifiableIntegerDBIDs extends java.lang.Object implements StaticDBIDs, IntegerDBIDs
Unmodifiable wrapper for DBIDs.- Since:
- 0.5.0
- Author:
- Erich Schubert
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) static class
UnmodifiableIntegerDBIDs.UnmodifiableDBIDIter
Make an existing DBIDMIter unmodifiable.
-
Field Summary
Fields Modifier and Type Field Description private IntegerDBIDs
inner
The DBIDs we wrap.
-
Constructor Summary
Constructors Constructor Description UnmodifiableIntegerDBIDs(IntegerDBIDs inner)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
contains(DBIDRef o)
Test whether an ID is contained.boolean
isEmpty()
Test for an empty DBID collection.IntegerDBIDIter
iter()
Get a DBID iterator (a more efficient API).int
size()
Retrieve the collection / data size.java.lang.String
toString()
-
-
-
Field Detail
-
inner
private final IntegerDBIDs inner
The DBIDs we wrap.
-
-
Constructor Detail
-
UnmodifiableIntegerDBIDs
public UnmodifiableIntegerDBIDs(IntegerDBIDs inner)
Constructor.- Parameters:
inner
- Inner DBID collection.
-
-
Method Detail
-
contains
public boolean contains(DBIDRef o)
Description copied from interface:DBIDs
Test whether an ID is contained.
-
isEmpty
public boolean isEmpty()
Description copied from interface:DBIDs
Test for an empty DBID collection.
-
iter
public IntegerDBIDIter iter()
Description copied from interface:DBIDs
Get a DBID iterator (a more efficient API).Example:
for(DBIDIter iter = ids.iter(); iter.valid(); iter.advance()) { NumberVector vec = relation.get(iter); // iter is a temporary object reference }
- Specified by:
iter
in interfaceDBIDs
- Specified by:
iter
in interfaceIntegerDBIDs
- Returns:
- iterator
-
size
public int size()
Description copied from interface:DBIDs
Retrieve the collection / data size.
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-