Exemplo n.º 1
0
    public boolean equals(Object object) {
      boolean isEqual = false;
      HashKey hashKey;

      if (object instanceof HashKey) {
        hashKey = (HashKey) object;
        ConnectionAnchor hkA1 = hashKey.getFirstAnchor();
        ConnectionAnchor hkA2 = hashKey.getSecondAnchor();

        isEqual =
            (hkA1.equals(anchor1) && hkA2.equals(anchor2))
                || (hkA1.equals(anchor2) && hkA2.equals(anchor1));
      }
      return isEqual;
    }
Exemplo n.º 2
0
 public int hashCode() {
   return anchor1.hashCode() ^ anchor2.hashCode();
 }