@Override
    public boolean equals(Object obj) {
        if (obj == null) {
            return false;
        }
        if (getClass() != obj.getClass()) {
            return false;
        }
        final Surovina other = (Surovina) obj;
        if (!Objects.equals(this.nazev, other.nazev)) {
            return false;
        }
        if (Double.doubleToLongBits(this.spotreba) != Double.doubleToLongBits(other.spotreba)) {
            return false;
        }
        if (Double.doubleToLongBits(this.mnozstvi) != Double.doubleToLongBits(other.mnozstvi)) {
            return false;
        }
        if (Double.doubleToLongBits(this.cena) != Double.doubleToLongBits(other.cena)) {
            return false;
        }
        return true;
    }