|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.crosswire.jsword.versification.QualifiedKey
public final class QualifiedKey
A QualifiedKey represents the various left and right sides of a map entry.
The QualifiedKey is Qualified:
The mapping can indicate a part of a verse. This is an internal implementation detail of the Versification mapping code. Here it is used to distinguish one QualifiedKey from another in equality tests and in containers.
The GNU Lesser General Public License for details.
The copyright to this program is held by its authors.
Nested Class Summary | |
---|---|
(package private) static class |
QualifiedKey.Qualifier
A Qualifier indicates whether the verse is numbered the same in both the KJV and the other, is missing in the KJV or the other. |
Field Summary | |
---|---|
private QualifiedKey.Qualifier |
absentType
|
private VerseKey |
qualifiedKey
|
private String |
sectionName
|
private VerseKey |
wholeKey
|
Constructor Summary | |
---|---|
QualifiedKey()
Constructs the QualifiedKey with the ABSENT_IN_LEFT qualifier. |
|
QualifiedKey(String sectionName)
|
|
QualifiedKey(Verse key)
Construct a QualifiedKey from a Verse. |
|
QualifiedKey(VerseRange key)
Construct a QualifiedKey from a Verse. |
Method Summary | |
---|---|
private static boolean |
bothNullOrEqual(Object x,
Object y)
Determine whether two objects are equal, allowing nulls |
static QualifiedKey |
create(VerseKey k)
Create a QualifiedKey from a Verse or a VerseRange. |
boolean |
equals(Object obj)
|
QualifiedKey.Qualifier |
getAbsentType()
|
VerseKey |
getKey()
|
String |
getSectionName()
|
Verse |
getVerse()
|
int |
hashCode()
|
boolean |
isWhole()
A QualifiedKey is whole if it does not split part of a reference. |
QualifiedKey |
reversify(Versification target)
Convert this QualifiedKey from one Versification to another. |
private void |
setKey(Verse key)
Allow override of the key, particular useful if we're constructing in 2 stages like the offset mechanism |
private void |
setKey(VerseRange key)
Allow override of the key, particular useful if we're constructing in 2 stages like the offset mechanism |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private VerseKey qualifiedKey
private VerseKey wholeKey
private String sectionName
private QualifiedKey.Qualifier absentType
Constructor Detail |
---|
public QualifiedKey(Verse key)
key
- the verse from which to create this QualifiedKeypublic QualifiedKey(VerseRange key)
key
- the verse range from which to create this QualifiedKeypublic QualifiedKey(String sectionName)
sectionName
- with a given section name, we assume absent in KJVpublic QualifiedKey()
Method Detail |
---|
public static QualifiedKey create(VerseKey k)
k
- the Verse or VerseRange
ClassCastException
public VerseKey getKey()
public Verse getVerse()
ClassCastException
public QualifiedKey.Qualifier getAbsentType()
public String getSectionName()
public boolean isWhole()
public QualifiedKey reversify(Versification target)
target
- The target versification
public String toString()
toString
in class Object
public int hashCode()
hashCode
in class Object
public boolean equals(Object obj)
equals
in class Object
private void setKey(Verse key)
key
- the new keyprivate void setKey(VerseRange key)
key
- the new keyprivate static boolean bothNullOrEqual(Object x, Object y)
x
- y
-
|
Copyright ยจ 2003-2015 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |