protected static class TroveArrayDBIDs.DBIDItr extends Object implements IntegerDBIDArrayMIter
Modifier and Type | Field and Description |
---|---|
(package private) int |
pos
Current position.
|
(package private) gnu.trove.list.TIntList |
store
The actual store we use.
|
Constructor and Description |
---|
TroveArrayDBIDs.DBIDItr(gnu.trove.list.TIntList store)
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 |
hashCode()
WARNING: Hash codes of this interface might not be stable (e.g. for
iterators).
|
int |
internalGetIndex()
Return the integer value of the object ID.
|
void |
remove()
Remove the object the iterator currently points to.
|
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
gnu.trove.list.TIntList store
public TroveArrayDBIDs.DBIDItr(gnu.trove.list.TIntList store)
store
- The actual trove storepublic 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()
IntegerDBIDRef
internalGetIndex
in interface DBIDRef
internalGetIndex
in interface IntegerDBIDRef
public void remove()
DBIDMIter
DBIDUtil.deref(de.lmu.ifi.dbs.elki.database.ids.DBIDRef)
may return a different
element. Call Iter.advance()
to advance the iterator to the next
element for further processing.public int hashCode()
DBIDRef
DBIDUtil.deref(de.lmu.ifi.dbs.elki.database.ids.DBIDRef)
to get an object with a stable hash code!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)
!