GenuineSounds icon

Untitled

GenuineSounds | PRO | 02/11/15 10:00:02 PM UTC | 0 ⭐ | 681 👁️ | Never ⏰ | []
Java |

1.31 KB

|

None

|

0 👍

/

0 👎

@Override
public int hashCode() {
    final int prime = 31;
    int result = 1;
    result = prime * result + Float.floatToIntBits(depth);
    result = prime * result + (generate ? 1231 : 1237);
    result = prime * result + Float.floatToIntBits(hardness);
    result = prime * result + nodes;
    result = prime * result + Float.floatToIntBits(rarity);
    result = prime * result + Float.floatToIntBits(resistance);
    result = prime * result + size;
    result = prime * result + Float.floatToIntBits(spread);
    return result;
}
 
@Override
public boolean equals(Object obj) {
    if (this == obj)
        return true;
    if (obj == null)
        return false;
    if (getClass() != obj.getClass())
        return false;
    Settings other = (Settings) obj;
    if (Float.floatToIntBits(depth) != Float.floatToIntBits(other.depth))
        return false;
    if (generate != other.generate)
        return false;
    if (Float.floatToIntBits(hardness) != Float.floatToIntBits(other.hardness))
        return false;
    if (nodes != other.nodes)
        return false;
    if (Float.floatToIntBits(rarity) != Float.floatToIntBits(other.rarity))
        return false;
    if (Float.floatToIntBits(resistance) != Float.floatToIntBits(other.resistance))
        return false;
    if (size != other.size)
        return false;
    if (Float.floatToIntBits(spread) != Float.floatToIntBits(other.spread))
        return false;
    return true;
}

Comments

  •  icon
    01/01/70 12:00:00 AM UTC
    Plain Text |

    0 B

    |

    👍

    /

    👎