@Override
  public boolean equals(Object obj) {
    if (this == obj) return true;
    if (obj == null) return false;

    if (obj instanceof Permission == false) return false;
    Permission other = (Permission) obj;
    if (other.getGranteeType() == null ^ this.getGranteeType() == null) return false;
    if (other.getGranteeType() != null
        && other.getGranteeType().equals(this.getGranteeType()) == false) return false;
    if (other.getGrantee() == null ^ this.getGrantee() == null) return false;
    if (other.getGrantee() != null && other.getGrantee().equals(this.getGrantee()) == false)
      return false;
    if (other.getAccess() == null ^ this.getAccess() == null) return false;
    if (other.getAccess() != null && other.getAccess().equals(this.getAccess()) == false)
      return false;
    return true;
  }