Interface Iter
-
- All Known Subinterfaces:
ArrayIter
,DBIDArrayIter
,DBIDArrayMIter
,DBIDIter
,DBIDMIter
,DoubleDBIDIter
,DoubleDBIDListIter
,DoubleDBIDListMIter
,DoubleHeap.UnsortedIter
,DoubleIntegerDBIDListIter
,DoubleIntegerDBIDListMIter
,DoubleIntegerHeap.UnsortedIter
,DoubleLongHeap.UnsortedIter
,DoubleObjectHeap.UnsortedIter<V>
,Histogram.Iter
,IntegerDBIDArrayIter
,IntegerDBIDArrayMIter
,IntegerDBIDIter
,IntegerDBIDMIter
,IntegerHeap.UnsortedIter
,IntegerObjectHeap.UnsortedIter<V>
,It<O>
,MIter
,ObjectHeap.UnsortedIter<K>
,PrioritySearcher<O>
,ScoreEvaluation.Adapter
- All Known Implementing Classes:
AbstractStaticHistogram.Iter
,AbstractVectorIter
,ArrayListIter
,ArrayModifiableIntegerDBIDs.Itr
,ArrayModifiableIntegerDBIDs.Slice.SliceItr
,ArrayStaticIntegerDBIDs.Itr
,ArrayStaticIntegerDBIDs.Slice.SliceItr
,CFTree.LeafIterator
,CFTree.LeafIterator
,ComparableMaxHeap.UnsortedIter
,ComparableMinHeap.UnsortedIter
,ComparatorMaxHeap.UnsortedIter
,ComparatorMinHeap.UnsortedIter
,ConcatIt
,CoverTree.CoverTreePriorityDBIDSearcher
,CoverTree.CoverTreePriorityObjectSearcher
,CoverTree.CoverTreePrioritySearcher
,DecreasingVectorIter
,DistanceResultAdapter
,DoubleHistogram.Iter
,DoubleIntegerDBIDArrayList.Itr
,DoubleIntegerDBIDHeap.UnorderedIter
,DoubleIntegerDBIDKNNHeap.UnorderedIter
,DoubleIntegerDBIDSubList.Itr
,DoubleIntegerMaxHeap.UnsortedIter
,DoubleIntegerMinHeap.UnsortedIter
,DoubleLongMaxHeap.UnsortedIter
,DoubleLongMinHeap.UnsortedIter
,DoubleMaxHeap.UnsortedIter
,DoubleMinHeap.UnsortedIter
,DoubleObjectMaxHeap.UnsortedIter
,DoubleObjectMinHeap.UnsortedIter
,EmptyDBIDs.EmptyDBIDIterator
,EmptyIterator
,EuclideanRStarTreeDistancePrioritySearcher
,ExactPrioritySearcher
,FastutilIntOpenHashSetModifiableDBIDs.Itr
,FilteredDistanceResultAdapter
,FilteredIt
,GNAT.GNATPriorityDBIDSearcher
,GNAT.GNATPriorityObjectSearcher
,GNAT.GNATPrioritySearcher
,HashMapHierarchy.ItrAll
,HashMapHierarchy.ItrAnc
,HashMapHierarchy.ItrDesc
,HashMapHierarchy.Rec.ItrChildren
,HashMapHierarchy.Rec.ItrChildrenReverse
,HashMapHierarchy.Rec.ItrParents
,HashMapHierarchy.Rec.ItrParentsReverse
,Heap.UnorderedIter
,IncreasingVectorIter
,IntegerDBID.Itr
,IntegerDBIDKNNSubList.Itr
,IntegerDBIDPair.Itr
,IntegerDBIDPair.Slice.SliceItr
,IntegerDBIDRange.Itr
,IntegerDBIDVar.Itr
,IntegerMaxHeap.UnsortedIter
,IntegerMinHeap.UnsortedIter
,IntegerObjectMaxHeap.UnsortedIter
,IntegerObjectMinHeap.UnsortedIter
,IterableIt
,LinearScanEuclideanPrioritySearcher
,LinearScanEuclideanPrioritySearcher.ByDBID
,LinearScanEuclideanPrioritySearcher.ByObject
,LinearScanPrioritySearcher
,LinearScanPrioritySearcher.ByDBID
,LinearScanPrioritySearcher.ByObject
,MemoryKDTree.KDTreePrioritySearcher
,Metadata.EagerIt
,Metadata.Hierarchy.ItrAnc
,Metadata.Hierarchy.ItrChildren
,Metadata.Hierarchy.ItrChildrenReverse
,Metadata.Hierarchy.ItrDesc
,Metadata.Hierarchy.ItrParents
,Metadata.Hierarchy.ItrParentsReverse
,MinimalisticMemoryKDTree.KDTreePrioritySearcher
,ObjHistogram.Iter
,OutlierScoreAdapter
,PrecomputedDistanceMatrix.PrecomputedDistancePrioritySearcher
,RStarTreeDistancePrioritySearcher
,SimpleAdapter
,SimplifiedCoverTree.CoverTreePriorityDBIDSearcher
,SimplifiedCoverTree.CoverTreePriorityObjectSearcher
,SimplifiedCoverTree.CoverTreePrioritySearcher
,SmallMemoryKDTree.KDTreePrioritySearcher
,StackedIter
,SubtypeIt
,Tokenizer
,UnmodifiableIntegerArrayDBIDs.Itr
,UnmodifiableIntegerDBIDs.UnmodifiableDBIDIter
,VPTree.VPTreePriorityDBIDSearcher
,VPTree.VPTreePriorityObjectSearcher
,VPTree.VPTreePrioritySearcher
,WrappedPrioritySearchDBIDByLookup
,WrappedPrioritySearchDBIDByLookup.Linear
public interface Iter
Iterator interface for more than one return value.The Java standard
Iterator
interface has some drawbacks:- the only way to get the current value is to advance the iterator
- the iterator can only point to a single value
- the iterator can only return objects, not primitives
In some situations, this can save the creation of many small objects, which put load on the garbage collector. This super interface does not have a "get" operation, which is to come from specialized interfaces instead.
Usage example:
for (Iter iter = ids.iter(); iter.valid(); iter.advance()) { iter.doSomething(); }
- Since:
- 0.5.0
- Author:
- Erich Schubert
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Iter
advance()
Moves the iterator forward to the next entry.boolean
valid()
Returns true if the iterator currently points to a valid object.
-
-
-
Method Detail
-
valid
boolean valid()
Returns true if the iterator currently points to a valid object.- Returns:
- a
boolean
value, whether the position is valid.
-
advance
Iter advance()
Moves the iterator forward to the next entry.- Returns:
- The iterator itself.
-
-