@Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((addresses == null) ? 0 : addresses.hashCode()); result = prime * result + ((adminPass == null) ? 0 : adminPass.hashCode()); result = prime * result + ((flavorRef == null) ? 0 : flavorRef.hashCode()); result = prime * result + ((hostId == null) ? 0 : hostId.hashCode()); result = prime * result + id; result = prime * result + ((imageRef == null) ? 0 : imageRef.hashCode()); result = prime * result + ((metadata == null) ? 0 : metadata.hashCode()); result = prime * result + ((uuid == null) ? 0 : uuid.hashCode()); result = prime * result + ((name == null) ? 0 : name.hashCode()); result = prime * result + ((flavor == null) ? 0 : flavor.hashCode()); result = prime * result + ((image == null) ? 0 : image.hashCode()); return result; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; Server other = (Server) obj; if (addresses == null) { if (other.addresses != null) return false; } else if (!addresses.equals(other.addresses)) return false; if (adminPass == null) { if (other.adminPass != null) return false; } else if (!adminPass.equals(other.adminPass)) return false; if (flavorRef == null) { if (other.flavorRef != null) return false; } else if (!flavorRef.equals(other.flavorRef)) return false; if (hostId == null) { if (other.hostId != null) return false; } else if (!hostId.equals(other.hostId)) return false; if (id != other.id) return false; if (imageRef == null) { if (other.imageRef != null) return false; } else if (!imageRef.equals(other.imageRef)) return false; if (metadata == null) { if (other.metadata != null) return false; } else if (!metadata.equals(other.metadata)) return false; if (uuid == null) { if (other.uuid != null) return false; } else if (!uuid.equals(other.uuid)) return false; if (name == null) { if (other.name != null) return false; } else if (!name.equals(other.name)) return false; if (flavor == null) { if (other.flavor != null) return false; } else if (!flavor.equals(other.flavor)) return false; if (image == null) { if (other.image != null) return false; } else if (!image.equals(other.image)) return false; return true; }