public List<Entitlement> evaluate(String realm,Subject subject,Set<String> resourceNames,Map<String,Set<String>> environment) throws EntitlementException {
  if ((resourceNames == null) || resourceNames.isEmpty()) {
    throw new EntitlementException(424);
  }
  List<Entitlement> results=new ArrayList<Entitlement>();
  for (  String res : resourceNames) {
    List<Entitlement> r=evaluate(realm,subject,res,environment,false);
    if ((r != null) && !r.isEmpty()) {
      results.addAll(r);
    }
  }
  return results;
}

public List < Entitlement > evaluate ( String realm , Subject subject , Set < String > resourceNames , Map < String , Set < String > > environment ) throws EntitlementException { if ( ( resourceNames == null ) || resourceNames . isEmpty ( ) ) { throw new EntitlementException ( 424 ) ; } List < Entitlement > results = new ArrayList < Entitlement > ( ) ; for ( String res : resourceNames ) { List < Entitlement > r = evaluate ( realm , subject , res , environment , false ) ; if ( ( r != null ) && ! r . isEmpty ( ) ) { results . addAll ( r ) ; } } return results ; }
returns a list of entitlements for a given subject , resource names and environment .
