|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.zekr.engine.search.SearchScopeItem
public class SearchScopeItem
Constructor Summary | |
---|---|
SearchScopeItem()
Creates a new scope item from 1-1 to 1-1, inclusive. |
|
SearchScopeItem(int suraFrom,
int ayaFrom,
int suraTo,
int ayaTo,
boolean exclusive)
All parameters are behaved as 1-based. |
Method Summary | |
---|---|
static SearchScopeItem |
deserialize(java.lang.String scopeItemStr)
Creates a SearchScopeItem from the given string scopeItemStr . |
boolean |
equals(java.lang.Object obj)
|
boolean |
excludes(int sura,
int aya)
Tests whether an aya of a sura is excluded from this scope (works only if this item is exclusive). |
int |
getAyaFrom()
|
int |
getAyaTo()
|
int |
getSuraFrom()
|
int |
getSuraTo()
|
boolean |
includes(int sura,
int aya)
Tests whether an aya of a sura is included in this scope (works only if this item is inclusive). |
boolean |
isExclusive()
|
java.lang.String |
serialize()
|
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public SearchScopeItem()
public SearchScopeItem(int suraFrom, int ayaFrom, int suraTo, int ayaTo, boolean exclusive) throws IllegalSearchScopeItemException
IllegalSearchScopeItemException
- if from-to range is not considered.Method Detail |
---|
public int getAyaFrom()
public int getAyaTo()
public int getSuraFrom()
public int getSuraTo()
public boolean isExclusive()
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
true
if obj is of type SearchScopeItem
and all its properties are equal to
this
properties.public final boolean includes(int sura, int aya)
sura
- sura numberaya
- aya number
true
if this search scope item explicitly includes the aya, false
otherwise.public final boolean excludes(int sura, int aya)
sura
- sura numberaya
- aya number
true
if this search scope item explicitly excludes the aya, false
otherwise.public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String serialize()
public static SearchScopeItem deserialize(java.lang.String scopeItemStr)
scopeItemStr
. A string representation of a search
scope item is of the form [-]sura_from,aya_from,sura_to,aya_to. "-" is used to specify that
this search scope is exclusive.
scopeItemStr
- input scope item in string format
SearchScopeItem
instance
IllegalSearchScopeItemException
- if scope is not in well format
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |