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

        Currency currency1 = (Currency) o;

        if (id != currency1.id) return false;
        if (Float.compare(currency1.purchaseRatio, purchaseRatio) != 0) return false;
        if (Float.compare(currency1.saleRatio, saleRatio) != 0) return false;
        if (currency != null ? !currency.equals(currency1.currency) : currency1.currency != null) return false;

        return true;
    }