package models.formulas;
import lombok.AllArgsConstructor;
import lombok.Getter;
@Getter
@AllArgsConstructor
public class Then extends Formula {
private Formula condition;
private Formula result;
@Override
public String toString() {
return condition.toString() + " => " + result.toString();
}
@Override
public int hashCode() {
return toString().hashCode();
}
@Override
public boolean equals(Object another) {
if (! (another instanceof Then)) {
return false;
}
Then then = (Then) another;
return this.condition.equals(then.getCondition()) && this.result.equals(then.getResult());
}
}