Package elki.database.ids
Class EmptyDBIDs.EmptyDBIDIterator
- java.lang.Object
-
- elki.database.ids.EmptyDBIDs.EmptyDBIDIterator
-
- All Implemented Interfaces:
DBIDArrayIter
,DBIDArrayMIter
,DBIDIter
,DBIDMIter
,DBIDRef
,ArrayIter
,Iter
,MIter
- Enclosing class:
- EmptyDBIDs
protected static class EmptyDBIDs.EmptyDBIDIterator extends java.lang.Object implements DBIDArrayMIter
Iterator for empty DBIDs-- Author:
- Erich Schubert
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
EmptyDBIDIterator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description EmptyDBIDs.EmptyDBIDIterator
advance()
Moves the iterator forward to the next entry.EmptyDBIDs.EmptyDBIDIterator
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
internalGetIndex()
Internal only: Get the internal index.void
remove()
Remove the object the iterator currently points to.EmptyDBIDs.EmptyDBIDIterator
retract()
Moves the iterator backward to the previous entry.EmptyDBIDs.EmptyDBIDIterator
seek(int off)
Moves the iterator to the given positionvoid
setDBID(DBIDRef val)
Set the current value.boolean
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 EmptyDBIDs.EmptyDBIDIterator advance()
Description copied from interface:Iter
Moves the iterator forward to the next entry.
-
internalGetIndex
public int internalGetIndex()
Description copied from interface:DBIDRef
Internal only: Get the internal index.NOT FOR PUBLIC USE - ELKI Optimization engine only.
- Specified by:
internalGetIndex
in interfaceDBIDRef
- Returns:
- Internal index
-
equals
public boolean equals(java.lang.Object other)
Description copied from interface:DBIDRef
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.Use
DBIDUtil.equal(elki.database.ids.DBIDRef, elki.database.ids.DBIDRef)
orDBIDUtil.compare(elki.database.ids.DBIDRef, elki.database.ids.DBIDRef)
!
-
remove
public void remove()
Description copied from interface:DBIDMIter
Remove the object the iterator currently points to. Note: Subsequent calls toDBIDUtil.deref(elki.database.ids.DBIDRef)
may return a different element. CallDBIDIter.advance()
to advance the iterator to the next element for further processing.
-
advance
public EmptyDBIDs.EmptyDBIDIterator 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 EmptyDBIDs.EmptyDBIDIterator 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 EmptyDBIDs.EmptyDBIDIterator 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
- Specified by:
seek
in interfaceDBIDArrayMIter
- Parameters:
off
- Seek offset- Returns:
- Iterator
-
getOffset
public int getOffset()
Description copied from interface:ArrayIter
Get current iterator offset.
-
setDBID
public void setDBID(DBIDRef val)
Description copied from interface:DBIDArrayMIter
Set the current value. Note: if the iterator is just after the last position, this may be equivalent to an add, but some implementations may not support this operation!- Specified by:
setDBID
in interfaceDBIDArrayMIter
- Parameters:
val
- new value
-
-