Code example for BigInteger

Methods: equals

0
	} 
 
	public boolean equals(DSAPublicKey o) {
		if(this == o) // Not necessary, but a very cheap optimization
			return true; 
		return y.equals(o.y) && getGroup().equals(o.getGroup());
	} 
 
	@Override 
	public int hashCode() { 
		return y.hashCode() ^ getGroup().hashCode();
	} 
 
	@Override 
	public boolean equals(Object o) {
		if(this == o) // Not necessary, but a very cheap optimization
			return true; 
		else if((o == null) || (o.getClass() != this.getClass()))
			return false; 
		return y.equals(((DSAPublicKey) o).y) && getGroup().equals(((DSAPublicKey) o).getGroup());
	}