|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.zekr.common.resource.QuranPropertiesUtils
public class QuranPropertiesUtils
This class tightly depends on the class QuranProperties
. Almost all public methods on this
class cache the static results once called, and if called more, read it from the cache.
This cache is not designed to be thread-safe. It is highly unsafe!
Field Summary | |
---|---|
static int |
QURAN_AYA_COUNT
Number of Quran ayas based on Uthmani Mushaf |
static int |
QURAN_SURA_COUNT
Number of Quran suras |
Constructor Summary | |
---|---|
QuranPropertiesUtils()
|
Method Summary | |
---|---|
static int |
diff(IQuranLocation loc1,
IQuranLocation loc2)
|
static int |
getAbsoluteLocation(IQuranLocation iql)
|
static int |
getAggregateAyaCount(int suraNum)
|
static JuzProperties |
getFirstJuzOf(int suraNum)
|
static int |
getHizbQuadIndex(int suraNum,
int ayaNum)
|
static int |
getHizbQuadIndex(IQuranLocation quranLoc)
|
static java.lang.String |
getIndexedSuraName(int suraNum)
|
static java.lang.String |
getIndexedSuraName(int suraNum,
java.lang.String suraName)
|
static java.lang.String |
getIndexedSuraName(SuraProperties sura)
|
static java.lang.String[] |
getIndexedSuraNames()
|
static JuzProperties |
getJuz(int juzNum)
|
static int[] |
getJuzInside(int suraNum)
If there is any juz start within the sura, it will be returned. |
static java.util.List |
getJuzInsideSura(int suraNum)
If there is any juz start within the sura, it will be returned. |
static JuzProperties |
getJuzOf(int suraNum,
int ayaNum)
|
static JuzProperties |
getJuzOf(IQuranLocation iql)
|
static IQuranLocation |
getLocation(int absoluteAyaNum)
|
static IQuranLocation |
getLocation(int sura,
int aya)
This method returns a Quran location, which is looked up from a cache of al Quran location. |
static IQuranLocation[] |
getLocations()
|
static java.util.List |
getPageData(IQuranPage quranPage)
|
static java.util.List |
getPageData(IQuranText quranText,
IQuranPage quranPage)
|
static int |
getRevelationOrder(IQuranLocation location)
|
static SajdaProperties |
getSajda(int sajdaNum)
|
static SajdaProperties |
getSajda(IQuranLocation location)
Find and return the sajda for this location. |
static java.util.List |
getSajdaInsideList(int suraNum)
|
static java.util.List |
getSajdaList()
|
static int |
getSajdaType(java.lang.String sajda)
|
static SuraProperties |
getSura(int suraNum)
|
static java.lang.String[] |
getSuraAyas(int suraNum)
|
static java.lang.String |
getSuraDescent(boolean isMadani)
|
static Range |
getSuraInsideJuz(int juz)
|
static java.lang.String |
getSuraJuz(int suraNum)
|
static java.util.List |
getSuraJuzAsList(int suraNum)
|
static java.lang.String[] |
getSuraNames()
|
static java.util.Map |
getSuraPropsMap(int suraNum)
|
static boolean |
isMadani(java.lang.String descent)
|
static boolean |
isValid(int sura,
int aya)
|
static boolean |
isValid(IQuranLocation quranLocation)
|
static java.lang.String |
propsToClipboadrFormat(java.util.Map suraProps)
|
static void |
resetIndexedSuraNames()
|
static void |
updateLocalizedSuraNames()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static int QURAN_AYA_COUNT
public static int QURAN_SURA_COUNT
Constructor Detail |
---|
public QuranPropertiesUtils()
Method Detail |
---|
public static final int getSajdaType(java.lang.String sajda)
public static final boolean isMadani(java.lang.String descent)
public static java.util.List getSajdaList()
public static final java.lang.String[] getSuraAyas(int suraNum)
suraNum
- sura number (counted from 1)
public static final java.lang.String[] getSuraNames()
public static final SuraProperties getSura(int suraNum)
suraNum
- (1-based)
SuraProperties
object corresponding to suraNum
public static final void resetIndexedSuraNames()
public static final java.lang.String[] getIndexedSuraNames()
public static final java.lang.String getIndexedSuraName(int suraNum, java.lang.String suraName)
public static final java.lang.String getIndexedSuraName(SuraProperties sura)
public static final java.lang.String getIndexedSuraName(int suraNum)
public static final JuzProperties getJuz(int juzNum)
public static final SajdaProperties getSajda(int sajdaNum)
public static final SajdaProperties getSajda(IQuranLocation location)
location
-
null
, if there is no sajda for this
location.public static final java.util.List getJuzInsideSura(int suraNum)
getJuzInside()
, but with a different return type.
suraNum
- sura number (counted from 1)
List
of JuzProperties
public static final int[] getJuzInside(int suraNum)
suraNum
- sura number (counted from 1)
int
array of juz numberspublic static final JuzProperties getFirstJuzOf(int suraNum)
public static final JuzProperties getJuzOf(IQuranLocation iql)
public static final JuzProperties getJuzOf(int suraNum, int ayaNum)
public static final int getHizbQuadIndex(int suraNum, int ayaNum)
public static int getHizbQuadIndex(IQuranLocation quranLoc)
public static final java.util.List getSajdaInsideList(int suraNum)
suraNum
- sura number (counted from 1)
List
of SajdaProperties
inside suraNum
public static final java.util.Map getSuraPropsMap(int suraNum)
suraNum
- sura number (counted from 1)
Map
public static final java.lang.String propsToClipboadrFormat(java.util.Map suraProps)
public static final java.lang.String getSuraDescent(boolean isMadani)
isMadani
-
String
of descent type of a sura (Makki or Madani)public static final java.lang.String getSuraJuz(int suraNum)
public static final java.util.List getSuraJuzAsList(int suraNum)
public static final Range getSuraInsideJuz(int juz)
juz
- juz number to find its suras
Range
object whose from and to are both inclusive.public static final int getAggregateAyaCount(int suraNum)
suraNum
- sura number (counted from 1)
public static final java.util.List getPageData(IQuranPage quranPage)
quranPage
-
IQuranPage
.public static final java.util.List getPageData(IQuranText quranText, IQuranPage quranPage)
quranText
- quranPage
-
IQuranPage
.public static void updateLocalizedSuraNames()
public static int getRevelationOrder(IQuranLocation location)
public static IQuranLocation[] getLocations()
QURAN_AYA_COUNT
.public static final IQuranLocation getLocation(int absoluteAyaNum)
absoluteAyaNum
- a positive number between 1 and 6236.
public static final boolean isValid(int sura, int aya)
public static final boolean isValid(IQuranLocation quranLocation)
public static final IQuranLocation getLocation(int sura, int aya)
IQuranLocation
is immutable, it can be shared.
sura
- (counted from 1)aya
- (counted from 1)
public static final int getAbsoluteLocation(IQuranLocation iql)
iql
- Quran location to be looked up
public static final int diff(IQuranLocation loc1, IQuranLocation loc2)
loc1
- first locationloc2
- second location
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |