@Override public int hashCode() { return getOsisRef().hashCode(); }
@Override public boolean equals(Object obj) { // This is cheating because I am supposed to say: // <code>!obj.getClass().equals(this.getClass())</code> // However I think it is entirely valid for a RangedPassage // to equal a DistinctPassage since the point of the Factory // is that the user does not need to know the actual type of the // Object he is using. if (!(obj instanceof Passage)) { return false; } Passage that = (Passage) obj; // The real test // FIXME: this is not really true since the versification any longer. return that.getOsisRef().equals(getOsisRef()); }