code: public static void addAction(Set<Action> aas, Action action, boolean condition) {
  
          if (condition) {
              aas.add(action);
          }
      }
docs: Adds an action to a set of actions if a condition is fulfilled.<p>
  
  @param aas the set of actions
  @param action the action to add
  @param condition the value of the condition for adding the action