public boolean equals(Object obj){
  if (obj instanceof Policy) {
    Policy p=(Policy)obj;
    if (rules.equals(p.rules) && users.equals(p.users) && referrals.equals(p.referrals)&& respProviders.equals(p.respProviders)&& conditions.equals(p.conditions)) {
      return (true);
    }
  }
  return (false);
}

public boolean equals ( Object obj ) { if ( obj instanceof Policy ) { Policy p = ( Policy ) obj ; if ( rules . equals ( p . rules ) && users . equals ( p . users ) && referrals . equals ( p . referrals ) && respProviders . equals ( p . respProviders ) && conditions . equals ( p . conditions ) ) { return ( true ) ; } } return ( false ) ; }
checks if two policy objects are equal . this method does not check the policy name and description for equality .
