Package elki.database.ids.integer
Class DoubleIntegerDBIDArrayList.Itr
- java.lang.Object
-
- elki.database.ids.integer.DoubleIntegerDBIDArrayList.Itr
-
- All Implemented Interfaces:
DBIDArrayIter,DBIDArrayMIter,DBIDIter,DBIDMIter,DBIDRef,DoubleDBIDIter,DoubleDBIDListIter,DoubleDBIDListMIter,DoubleIntegerDBIDListIter,DoubleIntegerDBIDListMIter,IntegerDBIDIter,IntegerDBIDRef,ArrayIter,Iter,MIter
- Enclosing class:
- DoubleIntegerDBIDArrayList
private class DoubleIntegerDBIDArrayList.Itr extends java.lang.Object implements DoubleIntegerDBIDListMIter
List iterator.- Author:
- Erich Schubert
-
-
Field Summary
Fields Modifier and Type Field Description (package private) intposCurrent offset.-
Fields inherited from interface elki.database.ids.DoubleDBIDListIter
EMPTY
-
-
Constructor Summary
Constructors Modifier Constructor Description privateItr()Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DoubleIntegerDBIDArrayList.Itradvance()Moves the iterator forward to the next entry.DoubleIntegerDBIDArrayList.Itradvance(int count)Moves the iterator forward or backward by the given offset.doubledoubleValue()Get the double valueintgetOffset()Get current iterator offset.intinternalGetIndex()Internal only: Get the internal index.voidremove()Remove the object the iterator currently points to.DoubleIntegerDBIDArrayList.Itrretract()Moves the iterator backward to the previous entry.DoubleIntegerDBIDArrayList.Itrseek(int off)Moves the iterator to the given positionvoidsetDBID(DBIDRef ref)Set the current value.voidsetDouble(double value)Update the value at the current position.java.lang.StringtoString()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 DoubleIntegerDBIDArrayList.Itr advance()
Description copied from interface:IterMoves the iterator forward to the next entry.- Specified by:
advancein interfaceArrayIter- Specified by:
advancein interfaceDBIDArrayIter- Specified by:
advancein interfaceDBIDIter- Specified by:
advancein interfaceDoubleDBIDIter- Specified by:
advancein interfaceDoubleDBIDListIter- Specified by:
advancein interfaceDoubleIntegerDBIDListIter- Specified by:
advancein interfaceIter- Returns:
- The iterator itself.
-
getOffset
public int getOffset()
Description copied from interface:ArrayIterGet current iterator offset.
-
advance
public DoubleIntegerDBIDArrayList.Itr 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- Specified by:
advancein interfaceDoubleDBIDListIter- Specified by:
advancein interfaceDoubleIntegerDBIDListIter- Parameters:
count- offset to move forward or backwards- Returns:
- Iterator
-
retract
public DoubleIntegerDBIDArrayList.Itr retract()
Description copied from interface:ArrayIterMoves the iterator backward to the previous entry.- Specified by:
retractin interfaceArrayIter- Specified by:
retractin interfaceDBIDArrayIter- Specified by:
retractin interfaceDoubleDBIDListIter- Specified by:
retractin interfaceDoubleIntegerDBIDListIter- Returns:
- Iterator
-
seek
public DoubleIntegerDBIDArrayList.Itr 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- Specified by:
seekin interfaceDoubleDBIDListIter- Specified by:
seekin interfaceDoubleDBIDListMIter- Specified by:
seekin interfaceDoubleIntegerDBIDListIter- Specified by:
seekin interfaceDoubleIntegerDBIDListMIter- Parameters:
off- Seek offset- Returns:
- Iterator
-
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- Specified by:
internalGetIndexin interfaceIntegerDBIDRef- Returns:
- Internal index
-
doubleValue
public double doubleValue()
Description copied from interface:DoubleDBIDIterGet the double value- Specified by:
doubleValuein interfaceDoubleDBIDIter- Returns:
- double value
-
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.
-
setDBID
public void setDBID(DBIDRef ref)
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:
ref- new value
-
setDouble
public void setDouble(double value)
Description copied from interface:DoubleDBIDListMIterUpdate the value at the current position.- Specified by:
setDoublein interfaceDoubleDBIDListMIter- Parameters:
value- New value
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-