Package com.attivio.sdk.token
Class PositionIterator
- java.lang.Object
- 
- com.attivio.sdk.token.PositionIterator
 
- 
 public final class PositionIterator extends java.lang.Object implements java.util.Iterator<Position>, java.lang.Iterable<Position> Iterates over all unique positions in a TokenList.WARNING: the Position instance returned by next() will always be the same reference. If you want to save positions as you are iterating, you should call Position.clone() on the returned position. 
- 
- 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description Positionget()Get the current position.booleanhasNext()Returns true if a next position exists.PositionIteratoriterator()Implement iterator() to return self (for Iterable interface).Positionnext()voidremove()voidseek(Position p)Expert: Seek to a position.
 
- 
- 
- 
Method Detail- 
getpublic Position get() Get the current position.NOTE: this is undefined until next()has been called the first time.
 - 
seekpublic void seek(Position p) Expert: Seek to a position.
 - 
iteratorpublic PositionIterator iterator() Implement iterator() to return self (for Iterable interface).- Specified by:
- iteratorin interface- java.lang.Iterable<Position>
 
 - 
hasNextpublic boolean hasNext() Returns true if a next position exists.- Specified by:
- hasNextin interface- java.util.Iterator<Position>
 
 - 
removepublic final void remove() - Specified by:
- removein interface- java.util.Iterator<Position>
 
 
- 
 
-