/** * Tests this VirtualMachine for equality with another object. * * <p> * * <p>If the given object is not a VirtualMachine then this method returns <tt>false</tt>. For two * VirtualMachines to be considered equal requires that they both reference the same provider, and * their {@link VirtualMachineDescriptor#id() identifiers} are equal. * * <p> * * <p>This method satisfies the general contract of the {@link java.lang.Object#equals(Object) * Object.equals} method. * * @param ob The object to which this object is to be compared * @return <tt>true</tt> if, and only if, the given object is a VirtualMachine that is equal to * this VirtualMachine. */ public boolean equals(Object ob) { if (ob == this) { return true; } if (!(ob instanceof VirtualMachine)) { return false; } VirtualMachine other = (VirtualMachine) ob; return other.provider() == provider() && other.id().equals(id()); }