@Override public boolean equals(Object obj){
  boolean matched=true;
  if (obj == null || !(obj instanceof Rule)) {
    return false;
  }
  Rule other=(Rule)obj;
  if (applicationName == null) {
    if (other.applicationName != null) {
      return false;
    }
  }
 else   if (!applicationName.equals(other.applicationName)) {
    return false;
  }
  if (resourceNames == null) {
    if (other.resourceNames != null) {
      return false;
    }
  }
 else {
    if (!resourceNames.equals(other.resourceNames)) {
      return false;
    }
  }
  if (!actions.equals(other.actions)) {
    return false;
  }
  return matched;
}

@ Override public boolean equals ( Object obj ) { boolean matched = true ; if ( obj == null || ! ( obj instanceof Rule ) ) { return false ; } Rule other = ( Rule ) obj ; if ( applicationName == null ) { if ( other . applicationName != null ) { return false ; } } else if ( ! applicationName . equals ( other . applicationName ) ) { return false ; } if ( resourceNames == null ) { if ( other . resourceNames != null ) { return false ; } } else { if ( ! resourceNames . equals ( other . resourceNames ) ) { return false ; } } if ( ! actions . equals ( other . actions ) ) { return false ; } return matched ; }
checks if two rule objects are identical . two rules are identical only if the service name , resource name , action name and values match .
