/**
  * Compares two activation ids for content equality. Returns true if both of the following
  * conditions are true: 1) the unique identifiers equivalent (by content), and 2) the activator
  * specified in each identifier refers to the same remote object.
  *
  * @param obj the Object to compare with
  * @return true if these Objects are equal; false otherwise.
  * @see java.util.Hashtable
  * @since 1.2
  */
 public boolean equals(Object obj) {
   if (obj instanceof ActivationID) {
     ActivationID id = (ActivationID) obj;
     return (uid.equals(id.uid) && activator.equals(id.activator));
   } else {
     return false;
   }
 }
Exemple #2
0
 /** Compare this VMID to another, and return true if they are the same identifier. */
 public boolean equals(Object obj) {
   if (obj instanceof VMID) {
     VMID vmid = (VMID) obj;
     if (!uid.equals(vmid.uid)) return false;
     if ((addr == null) ^ (vmid.addr == null)) return false;
     if (addr != null) {
       if (addr.length != vmid.addr.length) return false;
       for (int i = 0; i < addr.length; ++i) if (addr[i] != vmid.addr[i]) return false;
     }
     return true;
   } else {
     return false;
   }
 }