[jsword-svn] jsword/java/jsword/org/crosswire/jsword/passage s
jswordcvs at crosswire.org
jswordcvs at crosswire.org
Tue Jan 3 06:25:36 MST 2006
Update of /cvs/jsword/jsword/java/jsword/org/crosswire/jsword/passage
In directory www.crosswire.org:/tmp/cvs-serv24436/java/jsword/org/crosswire/jsword/passage
Modified Files:
DefaultLeafKeyList.java
Log Message:
Unify Daily Devotions and Readings into a single behavior.
Index: DefaultLeafKeyList.java
===================================================================
RCS file: /cvs/jsword/jsword/java/jsword/org/crosswire/jsword/passage/DefaultLeafKeyList.java,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -d -r1.10 -r1.11
*** DefaultLeafKeyList.java 13 Aug 2005 14:41:40 -0000 1.10
--- DefaultLeafKeyList.java 3 Jan 2006 13:25:34 -0000 1.11
***************
*** 40,45 ****
public DefaultLeafKeyList(String name, String osisName)
{
! this.name = name;
! this.osisName = osisName;
}
--- 40,44 ----
public DefaultLeafKeyList(String name, String osisName)
{
! this(name, osisName, null);
}
***************
*** 190,193 ****
--- 189,226 ----
/* (non-Javadoc)
+ * @see java.lang.Object#equals(java.lang.Object)
+ */
+ public boolean equals(Object obj)
+ {
+ // Since this can not be null
+ if (obj == null)
+ {
+ return false;
+ }
+
+ // We might consider checking for equality against all Keys?
+ // However currently we don't.
+
+ // Check that that is the same as this
+ // Don't use instanceof since that breaks inheritance
+ if (!obj.getClass().equals(this.getClass()))
+ {
+ return false;
+ }
+
+ // The real bit ...
+ DefaultLeafKeyList that = (DefaultLeafKeyList) obj;
+ return name.equals(that.name) && osisName.equals(that.osisName);
+ }
+
+ /* (non-Javadoc)
+ * @see java.lang.Object#hashCode()
+ */
+ public int hashCode()
+ {
+ return name.hashCode();
+ }
+
+ /* (non-Javadoc)
* @see java.lang.Comparable#compareTo(java.lang.Object)
*/
More information about the jsword-svn
mailing list