optaplanner-examples/src/main/java/org/optaplanner/examples/travelingtournament/domain/Match.java
public boolean solutionEquals(Object o) {
        if (this == o) {
            return true;
        } else if (o instanceof Match) {
            Match other = (Match) o;
            return new EqualsBuilder()
                    .append(id, other.id)
                    .append(homeTeam, other.homeTeam)
                    .append(awayTeam, other.awayTeam)
                    .append(day, other.day)
                    .isEquals();
        } else {
            return false;
        }
    }
public boolean solutionEquals(Object o) {
        if (this == o) {
            return true;
        } else if (o instanceof Match) {
            Match other = (Match) o;
            return new EqualsBuilder()
                    .append(id, other.id)
                    .append(homeTeam, other.homeTeam)
                    .append(awayTeam, other.awayTeam)
                    .append(day, other.day)
                    .isEquals();
        } else {
            return false;
        }
    }
public boolean solutionEquals ( Object o ) { if ( this == o ) { return true ; } else if ( o instanceof Match ) { Match other = ( Match ) o ; return new EqualsBuilder ( ) . append ( id , other . id ) . append ( homeTeam , other . homeTeam ) . append ( awayTeam , other . awayTeam ) . append ( day , other . day ) . isEquals ( ) ; } else { return false ; } }
The normal methods {@link #equals(Object)} and {@link #hashCode()} cannot be used
because the rule engine already requires them (for performance in their original state).
@see #solutionHashCode()
The normal methods {