@Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((correct == null) ? 0 : correct.hashCode()); return result; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; Question other = (Question) obj; if (correct == null) { if (other.correct != null) return false; } else if (!correct.equals(other.correct)) return false; return true; }
public int evaluate() { final List<String> ans = options.get(this.answered).getTranslations(); if (ans.equals(correct.getTranslations())) return +1; return 0; }