Package elki.database.ids
Interface DBIDs
-
- All Known Subinterfaces:
ArrayDBIDs
,ArrayModifiableDBIDs
,ArrayStaticDBIDs
,DBID
,DBIDPair
,DBIDRange
,DBIDVar
,DoubleDBIDList
,DoubleIntegerDBIDList
,HashSetDBIDs
,HashSetModifiableDBIDs
,IntegerArrayDBIDs
,IntegerArrayStaticDBIDs
,IntegerDBIDs
,KNNList
,ModifiableDBIDs
,ModifiableDoubleDBIDList
,SetDBIDs
,StaticDBIDs
- All Known Implementing Classes:
ArrayModifiableIntegerDBIDs
,ArrayModifiableIntegerDBIDs.Slice
,ArrayStaticIntegerDBIDs
,ArrayStaticIntegerDBIDs.Slice
,COPACNeighborPredicate.COPACModel
,DoubleIntegerDBIDArrayList
,DoubleIntegerDBIDKNNList
,DoubleIntegerDBIDSubList
,EmptyDBIDs
,FastutilIntOpenHashSetModifiableDBIDs
,IntegerDBID
,IntegerDBIDKNNSubList
,IntegerDBIDPair
,IntegerDBIDPair.Slice
,IntegerDBIDRange
,IntegerDBIDVar
,UnmodifiableIntegerArrayDBIDs
,UnmodifiableIntegerDBIDs
public interface DBIDs
Interface for a collection of database references (IDs).- Since:
- 0.4.0
- Author:
- Erich Schubert
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description boolean
contains(DBIDRef o)
Test whether an ID is contained.default void
forEach(java.util.function.Consumer<? super DBIDRef> action)
Execute a function for each ID.default boolean
isEmpty()
Test for an empty DBID collection.DBIDIter
iter()
Get a DBID iterator (a more efficient API).int
size()
Retrieve the collection / data size.
-
-
-
Method Detail
-
iter
DBIDIter iter()
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 }
- Returns:
- iterator
-
size
int size()
Retrieve the collection / data size.- Returns:
- collection size
-
contains
boolean contains(DBIDRef o)
Test whether an ID is contained.- Parameters:
o
- object to test- Returns:
- true when contained
-
isEmpty
default boolean isEmpty()
Test for an empty DBID collection.- Returns:
- true when empty.
-
forEach
default void forEach(java.util.function.Consumer<? super DBIDRef> action)
Execute a function for each ID.- Parameters:
action
- Action to execute
-
-