コード例 #1
0
  @Override
  public ConfigurationRuleBuilder otherwise(Operation operation) {
    for (ConfigurationRuleBuilderInterceptor interceptor : interceptors) {
      operation = interceptor.otherwise(operation);
    }

    wrapped.addOtherwiseRule(rule).when(Not.any(rule)).perform(operation);

    return this;
  }
コード例 #2
0
  @Override
  public ConfigurationRuleBuilderOtherwise otherwise(Operation operation, Operation... operations) {
    List<Operation> list = new LinkedList<Operation>();
    list.add(operation);
    list.addAll(Arrays.asList(operations));

    for (ConfigurationRuleBuilderInterceptor interceptor : interceptors) {
      list = interceptor.otherwise(list);
    }

    wrapped
        .addOtherwiseRule(rule)
        .when(Not.any(rule))
        .perform(Perform.all(list.toArray(new Operation[list.size()])));

    return this;
  }