Example #1
0
  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }

    Ballot ballot = (Ballot) o;

    if (id == null || ballot.id == null) return false;
    return id.equals(ballot.id);
  }
Example #2
0
 @Override
 public int hashCode() {
   return id != null ? id.hashCode() : -1;
 }