public boolean equals(Object object){
  if (this == object) {
    return true;
  }
 else   if (object == null || getClass() != object.getClass()) {
    return false;
  }
  return principal.equals(object.toString());
}

public boolean equals ( Object object ) { if ( this == object ) { return true ; } else if ( object == null || getClass ( ) != object . getClass ( ) ) { return false ; } return principal . equals ( object . toString ( ) ) ; }
compares this principal to the specified object . returns true if the object passed in matches the principal .
