Package elki.database.ids.integer
Class IntegerDBIDPair.Itr
- java.lang.Object
-
- elki.database.ids.integer.IntegerDBIDPair.Itr
-
- All Implemented Interfaces:
DBIDArrayIter
,DBIDIter
,DBIDRef
,IntegerDBIDArrayIter
,IntegerDBIDIter
,IntegerDBIDRef
,ArrayIter
,Iter
- Enclosing class:
- IntegerDBIDPair
private static class IntegerDBIDPair.Itr extends java.lang.Object implements IntegerDBIDArrayIter
Iterator.- Author:
- Erich Schubert
-
-
Constructor Summary
Constructors Constructor Description Itr(int first, int second)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description IntegerDBIDPair.Itr
advance()
Moves the iterator forward to the next entry.DBIDArrayIter
advance(int count)
Moves the iterator forward or backward by the given offset.int
getOffset()
Get current iterator offset.int
internalGetIndex()
Return the integer value of the object ID.DBIDArrayIter
retract()
Moves the iterator backward to the previous entry.DBIDArrayIter
seek(int off)
Moves the iterator to the given positionboolean
valid()
Returns true if the iterator currently points to a valid object.
-
-
-
Method Detail
-
valid
public boolean valid()
Description copied from interface:Iter
Returns true if the iterator currently points to a valid object.
-
advance
public IntegerDBIDPair.Itr advance()
Description copied from interface:Iter
Moves the iterator forward to the next entry.
-
internalGetIndex
public int internalGetIndex()
Description copied from interface:IntegerDBIDRef
Return the integer value of the object ID.- Specified by:
internalGetIndex
in interfaceDBIDRef
- Specified by:
internalGetIndex
in interfaceIntegerDBIDRef
- Returns:
- integer id
-
getOffset
public int getOffset()
Description copied from interface:ArrayIter
Get current iterator offset.
-
advance
public DBIDArrayIter advance(int count)
Description copied from interface:ArrayIter
Moves the iterator forward or backward by the given offset.- Specified by:
advance
in interfaceArrayIter
- Specified by:
advance
in interfaceDBIDArrayIter
- Parameters:
count
- offset to move forward or backwards- Returns:
- Iterator
-
retract
public DBIDArrayIter retract()
Description copied from interface:ArrayIter
Moves the iterator backward to the previous entry.- Specified by:
retract
in interfaceArrayIter
- Specified by:
retract
in interfaceDBIDArrayIter
- Returns:
- Iterator
-
seek
public DBIDArrayIter seek(int off)
Description copied from interface:ArrayIter
Moves the iterator to the given position- Specified by:
seek
in interfaceArrayIter
- Specified by:
seek
in interfaceDBIDArrayIter
- Parameters:
off
- Seek offset- Returns:
- Iterator
-
-