protected class IntegerDBID.Itr extends java.lang.Object implements DBIDArrayIter, IntegerDBIDRef
Modifier and Type | Field and Description |
---|---|
(package private) int |
pos
Iterator position: We use an integer so we can support retract().
|
Modifier | Constructor and Description |
---|---|
protected |
Itr() |
Modifier and Type | Method and Description |
---|---|
IntegerDBID.Itr |
advance()
Moves the iterator forward to the next entry.
|
IntegerDBID.Itr |
advance(int count)
Moves the iterator forward or backward by the given offset.
|
boolean |
equals(java.lang.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()
Internal only: Get the internal index.
|
IntegerDBID.Itr |
retract()
Moves the iterator backward to the previous entry.
|
IntegerDBID.Itr |
seek(int off)
Moves the iterator to the given position
|
java.lang.String |
toString() |
boolean |
valid()
Returns true if the iterator currently points to a valid object.
|
public IntegerDBID.Itr advance()
Iter
public IntegerDBID.Itr advance(int count)
ArrayIter
advance
in interface DBIDArrayIter
advance
in interface ArrayIter
count
- offset to move forward or backwardspublic IntegerDBID.Itr retract()
ArrayIter
retract
in interface DBIDArrayIter
retract
in interface ArrayIter
public IntegerDBID.Itr seek(int off)
ArrayIter
seek
in interface DBIDArrayIter
seek
in interface ArrayIter
off
- Seek offsetpublic int getOffset()
ArrayIter
public int internalGetIndex()
DBIDRef
NOT FOR PUBLIC USE - ELKI Optimization engine only.
internalGetIndex
in interface DBIDRef
internalGetIndex
in interface IntegerDBIDRef
public boolean valid()
Iter
public int hashCode()
DBIDRef
Use DBIDUtil.deref(de.lmu.ifi.dbs.elki.database.ids.DBIDRef)
to get an object with a stable hash code!
public boolean equals(java.lang.Object other)
DBIDRef
Use 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)
!
public java.lang.String toString()
toString
in class java.lang.Object
Copyright © 2019 ELKI Development Team. License information.