@Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; Alteration that = (Alteration) o; if (Double.compare(that.chance, chance) != 0) return false; return replacer.equals(that.replacer); }