net.sf.zekr.common.resource
Class AbstractRangedQuranText

java.lang.Object
  extended by net.sf.zekr.common.resource.AbstractQuranText
      extended by net.sf.zekr.common.resource.AbstractRangedQuranText
All Implemented Interfaces:
IQuranText
Direct Known Subclasses:
RangedQuranText

public abstract class AbstractRangedQuranText
extends AbstractQuranText

Author:
Mohsen Saboorian

Field Summary
 
Fields inherited from interface net.sf.zekr.common.resource.IQuranText
SIMPLE_MODE, UTHMANI_MODE
 
Constructor Summary
AbstractRangedQuranText()
           
 
Method Summary
abstract  java.lang.String currentAya()
          Returns the current aya.
abstract  boolean findNext()
          Finds the next aya matching range restrictions (after applying scopes).
abstract  IQuranLocation getCurrentLocation()
          Returns the current Quran location.
abstract  SearchScope getSearchScope()
          Returns SearchScope object for this ranged text.
abstract  void reset()
          Resets the Quran location, setting the pointer to the start of the text.
 
Methods inherited from class net.sf.zekr.common.resource.AbstractQuranText
get
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface net.sf.zekr.common.resource.IQuranText
get, get, getBismillah, getFullText, getMode, getSura, getTranslationData
 

Constructor Detail

AbstractRangedQuranText

public AbstractRangedQuranText()
Method Detail

reset

public abstract void reset()
Resets the Quran location, setting the pointer to the start of the text. It is called on object creation to find the start location point.


getCurrentLocation

public abstract IQuranLocation getCurrentLocation()
Returns the current Quran location.

Returns:
the current Quran location.

getSearchScope

public abstract SearchScope getSearchScope()
Returns SearchScope object for this ranged text.

Returns:
underling SearchScope object

currentAya

public abstract java.lang.String currentAya()
Returns the current aya.

Returns:
the current aya, of null if there is no more matched aya.

findNext

public abstract boolean findNext()
Finds the next aya matching range restrictions (after applying scopes). A call to currentAya()() will return the found aya.

Returns:
true if next aya found, or false if no more aya.