protected static class IntegerDBIDRange.DBIDItr extends Object implements DBIDArrayIter, IntegerDBIDRef
Modifier and Type | Field and Description |
---|---|
(package private) int |
len
Interval length.
|
(package private) int |
pos
Current position.
|
(package private) int |
start
Interval start.
|
Constructor and Description |
---|
IntegerDBIDRange.DBIDItr(int start,
int len)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
advance()
Moves the iterator forward to the next entry.
|
void |
advance(int count)
Moves the iterator forward or backward by the given offset.
|
boolean |
equals(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.
|
int |
getOffset()
Get current iterator offset.
|
int |
internalGetIndex()
Get the internal index.
|
void |
retract()
Moves the iterator backward to the previous entry.
|
void |
seek(int off)
Moves the iterator to the given position
|
String |
toString() |
boolean |
valid()
Returns true if the iterator currently points to a valid object.
|
int pos
final int len
final int start
IntegerDBIDRange.DBIDItr(int start, int len)
start
- Interval startlen
- Interval lengthpublic boolean valid()
Iter
public void advance()
Iter
public void advance(int count)
ArrayIter
public void retract()
ArrayIter
public void seek(int off)
ArrayIter
public int getOffset()
ArrayIter
public int internalGetIndex()
DBIDRef
internalGetIndex
in interface DBIDRef
internalGetIndex
in interface IntegerDBIDRef
public boolean equals(Object other)
DBIDRef
DBIDUtil.equal(de.lmu.ifi.dbs.elki.database.ids.DBIDRef, de.lmu.ifi.dbs.elki.database.ids.DBIDRef)
or DBIDUtil.compare(de.lmu.ifi.dbs.elki.database.ids.DBIDRef, de.lmu.ifi.dbs.elki.database.ids.DBIDRef)
!