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:
Comparable, Key

public class ReadingsKey
extends DefaultLeafKeyList

For a readings dictionary the keys are dates.

Distribution Licence:
JSword is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2 as published by the Free Software Foundation.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
The License is available on the internet here, or by writing to: Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
The copyright to this program is held by it's authors.

Version:
$Id: ReadingsKey.java,v 1.10 2004/08/16 22:08:44 joe Exp $
Author:
Joe Walker [joe at eireneh dot com]
See Also:
Licence

Field Summary
private  Date date
          The day of the year for the readings
private static DateFormat NAME_DF
          Date formatter
private static DateFormat OSIS_DF
           
 
Constructor Summary
protected ReadingsKey(Date date)
          Simple Constructor.
protected ReadingsKey(String text, String osisName, Key parent)
          Simple Constructor.
 
Method Summary
 int compareTo(Object obj)
           
 boolean equals(Object obj)
           
 int hashCode()
           
 
Methods inherited from class org.crosswire.jsword.passage.DefaultLeafKeyList
addAll, blur, canHaveChildren, clear, contains, get, getChildCount, getName, getOSISName, getParent, indexOf, isEmpty, iterator, removeAll, retainAll, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

date

private Date date
The day of the year for the readings


NAME_DF

private static final DateFormat NAME_DF
Date formatter


OSIS_DF

private static final DateFormat OSIS_DF
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)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

compareTo

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

Copyright ? 2003-2004