Package elki.database.ids.integer
Class UnmodifiableIntegerArrayDBIDs.Itr
- java.lang.Object
-
- elki.database.ids.integer.UnmodifiableIntegerArrayDBIDs.Itr
-
- All Implemented Interfaces:
DBIDArrayIter,DBIDIter,DBIDRef,IntegerDBIDArrayIter,IntegerDBIDIter,IntegerDBIDRef,ArrayIter,Iter
- Enclosing class:
- UnmodifiableIntegerArrayDBIDs
private static class UnmodifiableIntegerArrayDBIDs.Itr extends java.lang.Object implements IntegerDBIDArrayIter
Make an existing DBIDMIter unmodifiable.- Author:
- Erich Schubert
-
-
Field Summary
Fields Modifier and Type Field Description private IntegerDBIDArrayIteritWrapped iterator.
-
Constructor Summary
Constructors Constructor Description Itr(IntegerDBIDArrayIter it)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DBIDArrayIteradvance()Moves the iterator forward to the next entry.DBIDArrayIteradvance(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.DBIDArrayIterretract()Moves the iterator backward to the previous entry.DBIDArrayIterseek(int off)Moves the iterator to the given positionjava.lang.StringtoString()booleanvalid()Returns true if the iterator currently points to a valid object.
-
-
-
Field Detail
-
it
private IntegerDBIDArrayIter it
Wrapped iterator.
-
-
Constructor Detail
-
Itr
public Itr(IntegerDBIDArrayIter it)
Constructor.- Parameters:
it- inner iterator
-
-
Method Detail
-
valid
public boolean valid()
Description copied from interface:IterReturns true if the iterator currently points to a valid object.
-
advance
public DBIDArrayIter advance()
Description copied from interface:IterMoves the iterator forward to the next entry.
-
advance
public DBIDArrayIter 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 DBIDArrayIter 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 DBIDArrayIter seek(int off)
Description copied from interface:ArrayIterMoves the iterator to the given position- Specified by:
seekin interfaceArrayIter- Specified by:
seekin interfaceDBIDArrayIter- Parameters:
off- Seek offset- Returns:
- Iterator
-
getOffset
public int getOffset()
Description copied from interface:ArrayIterGet current iterator offset.
-
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
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-