Package elki.database.ids.integer
Class ArrayModifiableIntegerDBIDs.Itr
- java.lang.Object
-
- elki.database.ids.integer.ArrayModifiableIntegerDBIDs.Itr
-
- All Implemented Interfaces:
DBIDArrayIter,DBIDArrayMIter,DBIDIter,DBIDMIter,DBIDRef,IntegerDBIDArrayIter,IntegerDBIDArrayMIter,IntegerDBIDIter,IntegerDBIDMIter,IntegerDBIDRef,ArrayIter,Iter,MIter
- Enclosing class:
- ArrayModifiableIntegerDBIDs
private class ArrayModifiableIntegerDBIDs.Itr extends java.lang.Object implements IntegerDBIDArrayMIter
Iterator class.- Author:
- Erich Schubert
-
-
Field Summary
Fields Modifier and Type Field Description (package private) intposIterator position.
-
Constructor Summary
Constructors Modifier Constructor Description privateItr()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ArrayModifiableIntegerDBIDs.Itradvance()Moves the iterator forward to the next entry.ArrayModifiableIntegerDBIDs.Itradvance(int count)Moves the iterator forward or backward by the given offset.intgetOffset()Get current iterator offset.intinternalGetIndex()Return the integer value of the object ID.voidremove()Remove the object the iterator currently points to.ArrayModifiableIntegerDBIDs.Itrretract()Moves the iterator backward to the previous entry.ArrayModifiableIntegerDBIDs.Itrseek(int off)Moves the iterator to the given positionvoidsetDBID(DBIDRef val)Set the current value.java.lang.StringtoString()booleanvalid()Returns true if the iterator currently points to a valid object.
-
-
-
Method Detail
-
internalGetIndex
public int internalGetIndex()
Description copied from interface:IntegerDBIDRefReturn the integer value of the object ID.- Specified by:
internalGetIndexin interfaceDBIDRef- Specified by:
internalGetIndexin interfaceIntegerDBIDRef- Returns:
- integer id
-
valid
public boolean valid()
Description copied from interface:IterReturns true if the iterator currently points to a valid object.
-
advance
public ArrayModifiableIntegerDBIDs.Itr advance()
Description copied from interface:IterMoves the iterator forward to the next entry.
-
getOffset
public int getOffset()
Description copied from interface:ArrayIterGet current iterator offset.
-
advance
public ArrayModifiableIntegerDBIDs.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- Parameters:
count- offset to move forward or backwards- Returns:
- Iterator
-
retract
public ArrayModifiableIntegerDBIDs.Itr 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 ArrayModifiableIntegerDBIDs.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- Parameters:
off- Seek offset- Returns:
- Iterator
-
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
-
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.
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-