Package elki.database.ids
Class EmptyDBIDs.EmptyDBIDIterator
- java.lang.Object
-
- elki.database.ids.EmptyDBIDs.EmptyDBIDIterator
-
- All Implemented Interfaces:
DBIDArrayIter,DBIDArrayMIter,DBIDIter,DBIDMIter,DBIDRef,ArrayIter,Iter,MIter
- Enclosing class:
- EmptyDBIDs
protected static class EmptyDBIDs.EmptyDBIDIterator extends java.lang.Object implements DBIDArrayMIter
Iterator for empty DBIDs-- Author:
- Erich Schubert
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedEmptyDBIDIterator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description EmptyDBIDs.EmptyDBIDIteratoradvance()Moves the iterator forward to the next entry.EmptyDBIDs.EmptyDBIDIteratoradvance(int count)Moves the iterator forward or backward by the given offset.booleanequals(java.lang.Object other)WARNING: calling equality on a reference may be an indicator of incorrect usage, as it is not clear whether the programmer meant the references to be the same or the DBIDs.intgetOffset()Get current iterator offset.intinternalGetIndex()Internal only: Get the internal index.voidremove()Remove the object the iterator currently points to.EmptyDBIDs.EmptyDBIDIteratorretract()Moves the iterator backward to the previous entry.EmptyDBIDs.EmptyDBIDIteratorseek(int off)Moves the iterator to the given positionvoidsetDBID(DBIDRef val)Set the current value.booleanvalid()Returns true if the iterator currently points to a valid object.
-
-
-
Method Detail
-
valid
public boolean valid()
Description copied from interface:IterReturns true if the iterator currently points to a valid object.
-
advance
public EmptyDBIDs.EmptyDBIDIterator advance()
Description copied from interface:IterMoves the iterator forward to the next entry.
-
internalGetIndex
public int internalGetIndex()
Description copied from interface:DBIDRefInternal only: Get the internal index.NOT FOR PUBLIC USE - ELKI Optimization engine only.
- Specified by:
internalGetIndexin interfaceDBIDRef- Returns:
- Internal index
-
equals
public boolean equals(java.lang.Object other)
Description copied from interface:DBIDRefWARNING: calling equality on a reference may be an indicator of incorrect usage, as it is not clear whether the programmer meant the references to be the same or the DBIDs.Use
DBIDUtil.equal(elki.database.ids.DBIDRef, elki.database.ids.DBIDRef)orDBIDUtil.compare(elki.database.ids.DBIDRef, elki.database.ids.DBIDRef)!
-
remove
public void remove()
Description copied from interface:DBIDMIterRemove the object the iterator currently points to. Note: Subsequent calls toDBIDUtil.deref(elki.database.ids.DBIDRef)may return a different element. CallDBIDIter.advance()to advance the iterator to the next element for further processing.
-
advance
public EmptyDBIDs.EmptyDBIDIterator advance(int count)
Description copied from interface:ArrayIterMoves the iterator forward or backward by the given offset.- Specified by:
advancein interfaceArrayIter- Specified by:
advancein interfaceDBIDArrayIter- Parameters:
count- offset to move forward or backwards- Returns:
- Iterator
-
retract
public EmptyDBIDs.EmptyDBIDIterator retract()
Description copied from interface:ArrayIterMoves the iterator backward to the previous entry.- Specified by:
retractin interfaceArrayIter- Specified by:
retractin interfaceDBIDArrayIter- Returns:
- Iterator
-
seek
public EmptyDBIDs.EmptyDBIDIterator seek(int off)
Description copied from interface:ArrayIterMoves the iterator to the given position- Specified by:
seekin interfaceArrayIter- Specified by:
seekin interfaceDBIDArrayIter- Specified by:
seekin interfaceDBIDArrayMIter- Parameters:
off- Seek offset- Returns:
- Iterator
-
getOffset
public int getOffset()
Description copied from interface:ArrayIterGet current iterator offset.
-
setDBID
public void setDBID(DBIDRef val)
Description copied from interface:DBIDArrayMIterSet the current value. Note: if the iterator is just after the last position, this may be equivalent to an add, but some implementations may not support this operation!- Specified by:
setDBIDin interfaceDBIDArrayMIter- Parameters:
val- new value
-
-