Example #1
0
 /**
  * Comparison of this object with another object, potentially another word. If the definition of
  * either word isn't set, then the comparison will be false. This was chosen to conserve
  * resources/time when doing potential large batch comparisons.
  *
  * @param o the other object to compare to.
  * @return whether this word is equal to another word, true if so, false if otherwise.
  */
 public boolean equals(Object o) {
   if (o instanceof Word) {
     Word otherWord = (Word) o;
     if (this.getWord().equals(otherWord.getWord())) {
       if (this.definition.equals(otherWord.getDefinitions())) {
         return true;
       }
     }
   }
   return false;
 }