public boolean equals(Object another){
  if (another instanceof Permission) {
    Permission p=(Permission)another;
    return permission.equals(p.toString());
  }
 else {
    return false;
  }
}

public boolean equals ( Object another ) { if ( another instanceof Permission ) { Permission p = ( Permission ) another ; return permission . equals ( p . toString ( ) ) ; } else { return false ; } }
this function returns true if the object passed matches the permission represented in this interface .
