/** * Compares all member variables of this object with the other object. * Returns only true, if all are equal in both objects. * * @param otherObject * The other object to compare to. * @return True, if other is an instance of this class and all member * variables of both objects are equal. False, otherwise. * @preconditions * @postconditions */ @Override public boolean equals(Object otherObject) { if (this == otherObject) { return true; } if (!(otherObject instanceof KeyPair)) { return false; } KeyPair other = (KeyPair) otherObject; return this.publicKey.equals(other.publicKey) && this.privateKey.equals(other.privateKey); }
/** * Compares all member variables of this object with the other object. * Returns only true, if all are equal in both objects. * * @param otherObject * The other object to compare to. * @return True, if other is an instance of this class and all member * variables of both objects are equal. False, otherwise. * @preconditions * @postconditions */ @Override public boolean equals(Object otherObject) { if (this == otherObject) { return true; } else if (!(otherObject instanceof ECPublicKey)) { return false; } ECPublicKey other = (ECPublicKey) otherObject; return super.equals(other) && this.ecdsaParams.equals(other.ecdsaParams) && this.ecPoint.equals(other.ecPoint); }
/** * Compares all member variables of this object with the other object. * Returns only true, if all are equal in both objects. * * @param otherObject * The other object to compare to. * @return True, if other is an instance of this class and all member * variables of both objects are equal. False, otherwise. * @preconditions * @postconditions */ @Override public boolean equals(Object otherObject) { if (this == otherObject) { return true; } else if (!(otherObject instanceof DHPublicKey)) { return false; } DHPublicKey other = (DHPublicKey) otherObject; return super.equals(other) && this.prime.equals(other.prime) && this.base.equals(other.base) && this.value.equals(other.value); }
/** * Compares all member variables of this object with the other object. * Returns only true, if all are equal in both objects. * * @param otherObject * The other object to compare to. * @return True, if other is an instance of this class and all member * variables of both objects are equal. False, otherwise. * @preconditions * @postconditions */ @Override public boolean equals(Object otherObject) { if (this == otherObject) { return true; } else if (!(otherObject instanceof RSAPublicKey)) { return false; } RSAPublicKey other = (RSAPublicKey) otherObject; return super.equals(other) && this.modulus.equals(other.modulus) && this.publicExponent.equals(other.publicExponent) && this.modulusBits.equals(other.modulusBits); }
/** * Compares all member variables of this object with the other object. * Returns only true, if all are equal in both objects. * * @param otherObject * The other object to compare to. * @return True, if other is an instance of this class and all member * variables of both objects are equal. False, otherwise. * @preconditions * @postconditions */ @Override public boolean equals(Object otherObject) { if (this == otherObject) { return true; } else if (!(otherObject instanceof KEAPublicKey)) { return false; } KEAPublicKey other = (KEAPublicKey) otherObject; return super.equals(other) && this.prime.equals(other.prime) && this.subprime.equals(other.subprime) && this.base.equals(other.base) && this.value.equals(other.value); }
/** * Compares all member variables of this object with the other object. * Returns only true, if all are equal in both objects. * * @param otherObject * The other object to compare to. * @return True, if other is an instance of this class and all member * variables of both objects are equal. False, otherwise. * @preconditions * @postconditions */ @Override public boolean equals(Object otherObject) { if (this == otherObject) { return true; } else if (!(otherObject instanceof DSAPublicKey)) { return false; } DSAPublicKey other = (DSAPublicKey) otherObject; return super.equals(other) && this.prime.equals(other.prime) && this.subprime.equals(other.subprime) && this.base.equals(other.base) && this.value.equals(other.value); }