public boolean equals(Object obj){
  if (obj instanceof ObjectEndpoint) {
    ObjectEndpoint oe=(ObjectEndpoint)obj;
    return id.equals(oe.id) && transport == oe.transport;
  }
 else {
    return false;
  }
}

public boolean equals ( Object obj ) { if ( obj instanceof ObjectEndpoint ) { ObjectEndpoint oe = ( ObjectEndpoint ) obj ; return id . equals ( oe . id ) && transport == oe . transport ; } else { return false ; } }
compares the specified object with this object endpoint for equality . this method returns true if and only if the specified object is an objectendpoint instance with the same object identifier and transport as this object .
