org.crosswire.jsword.book.readings
Class ReadingsKey

java.lang.Object
  extended by org.crosswire.jsword.passage.DefaultLeafKeyList
      extended by org.crosswire.jsword.book.readings.ReadingsKey
All Implemented Interfaces:
Serializable, Cloneable, Comparable, Iterable, Key

public class ReadingsKey
extends DefaultLeafKeyList

For a readings dictionary the keys are dates.

Author:
Joe Walker [joe at eireneh dot com]
See Also:
for license details. The copyright to this program is held by it's authors., Serialized Form

Field Summary
private  Date date
          The day of the year for the readings
private static MessageFormat KEY_FORMAT
           
private static DateFormat NAME_DF
          Date formatter
private static DateFormat OSIS_DF
           
private static long serialVersionUID
          Serialization ID
 
Constructor Summary
protected ReadingsKey(Date date)
          Simple Constructor.
protected ReadingsKey(String text, String osisName, Key parent)
          Simple Constructor.
 
Method Summary
 Object clone()
          This needs to be declared here so that it is visible as a method on a derived Key.
 int compareTo(Object obj)
           
 boolean equals(Object obj)
          This needs to be declared here so that it is visible as a method on a derived Key.
static String external2internal(Calendar externalKey)
           
 int hashCode()
          This needs to be declared here so that it is visible as a method on a derived Key.
 
Methods inherited from class org.crosswire.jsword.passage.DefaultLeafKeyList
addAll, blur, canHaveChildren, clear, contains, get, getCardinality, getChildCount, getName, getName, getOsisID, getOsisRef, getParent, getRootName, indexOf, isEmpty, iterator, removeAll, retainAll, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

date

private Date date
The day of the year for the readings


serialVersionUID

private static final long serialVersionUID
Serialization ID

See Also:
Constant Field Values

NAME_DF

private static final DateFormat NAME_DF
Date formatter


OSIS_DF

private static final DateFormat OSIS_DF

KEY_FORMAT

private static final MessageFormat KEY_FORMAT
Constructor Detail

ReadingsKey

protected ReadingsKey(String text,
                      String osisName,
                      Key parent)
               throws NoSuchKeyException
Simple Constructor.

Parameters:
text - The textual version of the date for these readings in the format "d mmmm"
osisName - The OSIS id of this Key
parent - This Key's parent (or null of this Key has no parent)
Throws:
NoSuchKeyException

ReadingsKey

protected ReadingsKey(Date date)
Simple Constructor.

Parameters:
date - The date for this key
Method Detail

equals

public boolean equals(Object obj)
Description copied from interface: Key
This needs to be declared here so that it is visible as a method on a derived Key.

Specified by:
equals in interface Key
Overrides:
equals in class DefaultLeafKeyList
Returns:
true if equal

hashCode

public int hashCode()
Description copied from interface: Key
This needs to be declared here so that it is visible as a method on a derived Key.

Specified by:
hashCode in interface Key
Overrides:
hashCode in class DefaultLeafKeyList
Returns:
the hashcode

compareTo

public int compareTo(Object obj)
Specified by:
compareTo in interface Comparable
Overrides:
compareTo in class DefaultLeafKeyList

clone

public Object clone()
Description copied from interface: Key
This needs to be declared here so that it is visible as a method on a derived Key.

Specified by:
clone in interface Key
Overrides:
clone in class DefaultLeafKeyList
Returns:
A complete copy of ourselves

external2internal

public static String external2internal(Calendar externalKey)

Copyright ยจ 2003-2006