Code example for BigInteger

Methods: hashCode

0
        return x;
    } 
 
    public int hashCode() 
    { 
        return x.hashCode() ^ super.hashCode();
    } 
 
    public boolean equals(Object obj)
    { 
        if(!(obj instanceof DHPrivateKeyParameters))
        { 
            return false; 
        } else 
        { 
            DHPrivateKeyParameters dhprivatekeyparameters = (DHPrivateKeyParameters)obj;
            return dhprivatekeyparameters.getX().equals(x) && super.equals(obj);
        } 
    } 
 
    private BigInteger x;