コード例 #1
0
  public boolean equals(Object anotherTelephoneNumberPK) {
    if (anotherTelephoneNumberPK.getClass() != TelephoneNumberPK.class) {
      return false;
    }

    TelephoneNumberPK telephoneNumberPK = (TelephoneNumberPK) anotherTelephoneNumberPK;

    return (telephoneNumberPK.getAreaCode().equals(getAreaCode())
        && telephoneNumberPK.getNumber().equals(getNumber())
        && telephoneNumberPK.getType().equals(getType()));
  }