@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (!(obj instanceof ISenseEntry)) return false; final ISenseEntry other = (ISenseEntry) obj; if (count != other.getTagCount()) return false; if (num != other.getSenseNumber()) return false; if (offset != other.getOffset()) return false; if(!key.equals(other.getSenseKey())) return false; return true; }
/** * Creates a new sense entry that replicates the specified sense entry. * The new sense entry replaces it's internal sense key with the * specified sense key thus removing a redundant object. * * @param key * the sense key to be used * @param old * the sense entry to be replicated * @return the new sense entry object * @throws NullPointerException * if either argument is <code>null</code> * @since JWI 2.2.0 */ protected ISenseEntry makeSenseEntry(ISenseKey key, ISenseEntry old){ return new SenseEntry(key, old.getOffset(), old.getSenseNumber(), old.getTagCount()); } }