public boolean equals(Object p){
  if (p instanceof PrincipalImpl || p instanceof GroupImpl) {
    if ((super.hashCode() & p.hashCode()) == p.hashCode())     return true;
 else     return false;
  }
 else {
    return false;
  }
}

public boolean equals ( Object p ) { if ( p instanceof PrincipalImpl || p instanceof GroupImpl ) { if ( ( super . hashCode ( ) & p . hashCode ( ) ) == p . hashCode ( ) ) return true ; else return false ; } else { return false ; } }
compares this group to the specified object . returns true if the object passed in matches the group represented .
