SE547: Security Automata: [20/20] Previous pageContents

class AndPolicy extends Policy {  
  private Policy p1;
  private Policy p2; 
  
  AndPolicy(Policy pol1, Policy pol2) {
    p1 = pol1;
    p2 = pol2;
  }
  Suggestion before(Action a) {

     Suggestion s1 = p1.before(a);
     Suggestion s2 = p2.before(a);
     if (s1.isOK() && s2.isOK())  
        return Suggestion.OK();  
     else ... 
  }
}

Previous pageContents