org.expasy.jpl.commons.collection.symbol.seq
Class AbstractSequencePositioner.Iterator

java.lang.Object
  extended by org.expasy.jpl.commons.collection.ExtraIterable.AbstractExtraIterator<Integer>
      extended by org.expasy.jpl.commons.collection.IndexIterable.Iterator
          extended by org.expasy.jpl.commons.collection.symbol.seq.AbstractSequencePositioner.Iterator
All Implemented Interfaces:
Iterator<Integer>
Direct Known Subclasses:
MotifMatcher.Iterator
Enclosing class:
AbstractSequencePositioner<T>

public abstract class AbstractSequencePositioner.Iterator
extends IndexIterable.Iterator

This inner class provides implementations for next() and hasNext() needed from Iterator interface. It announces and provides the mechanism of searching in a sequence and storing all positions matching an expression. (@see JPLRegExpPositioner and JPLSimpleAAPositioner).


Field Summary
protected  Integer nextPosition
           
 
Constructor Summary
AbstractSequencePositioner.Iterator()
           
 
Method Summary
abstract  boolean foundNextPosition()
          This function will have to set nextPosition to its value and will return true if a valid position is found otherwise false.
 boolean hasNext()
          Has found next match ? [method implemented to respect Iterator contract].
 Integer next()
          Returns the next Integer element [method implemented to respect Iterator contract].
 
Methods inherited from class org.expasy.jpl.commons.collection.ExtraIterable.AbstractExtraIterator
nextToList, nextToList, remove
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

nextPosition

protected Integer nextPosition
Constructor Detail

AbstractSequencePositioner.Iterator

public AbstractSequencePositioner.Iterator()
Method Detail

hasNext

public boolean hasNext()
Has found next match ? [method implemented to respect Iterator contract].


next

public Integer next()
Returns the next Integer element [method implemented to respect Iterator contract].


foundNextPosition

public abstract boolean foundNextPosition()
This function will have to set nextPosition to its value and will return true if a valid position is found otherwise false.



Copyright (c) 2012 Swiss Institute of Bioinformatics. All rights reserved.