/** * Check if the given object is equal to this GUID. * * <p>A GUID is equal to another GUID if the VMID and UID portions are * equal. * * @param obj Object to test equality with. * @return True if object is equal to this GUID. */ public boolean equals(final Object obj) { if (obj == this) return true; if (obj != null && obj.getClass() == getClass()) { GUID guid = (GUID)obj; return guid.vmid.equals(vmid) && guid.uid.equals(uid); } return false; }
/** * Check if the given object is equal to this VMID. * * <p>A VMID is equals to another VMID if the address, * process identifer and UID portions are equal. * * @param obj Object to test equality with. * @return True if object is equals to this VMID. */ public boolean equals(final Object obj) { if (obj == this) return true; if (obj != null && obj.getClass() == getClass()) { VMID vmid = (VMID)obj; return Arrays.equals(vmid.address, address) && vmid.pid.equals(pid) && vmid.uid.equals(uid); } return false; }