package im.darkgeek.dicts;

/**
 * Created by justin on 15-8-28.
 */
public class DictItem {
    private String word;
    private String explanation;

    public String getWord() {
        return word;
    }

    public void setWord(String word) {
        this.word = handleUnsafeChars(word);
    }

    public String getExplanation() {
        return explanation;
    }

    public void setExplanation(String explanation) {
        this.explanation = handleUnsafeChars(explanation);
    }

    private String handleUnsafeChars(String raw) {
        return
                raw.replace("\n", "")
                   .replace("\r", "");
    }

    @Override
    public String toString() {
        return "DictItem{" +
                "word='" + word + '\'' +
                ", explanation='" + explanation + '\'' +
                '}';
    }
}

@@ -832,11 +832,473 @@
 ';%0A    %7D
+%0A%0A    @Override%0A    public boolean equals(Object o) %7B%0A        if (this == o) return true;%0A        if (o == null %7C%7C getClass() != o.getClass()) return false;%0A%0A        DictItem item = (DictItem) o;%0A%0A        if (word != null ? !word.equals(item.word) : item.word != null) return false;%0A        return !(explanation != null ? !explanation.equals(item.explanation) : item.explanation != null);%0A%0A    %7D%0A%0A    @Override%0A    public int hashCode() %7B%0A        return 0;%0A    %7D
 %0A%7D%0A

Add equals method for comparision purpose.