1 package org.kuali.rice.krms.framework.engine;
2
3 import java.util.Arrays;
4 import java.util.List;
5
6 import org.kuali.rice.krms.api.engine.ExecutionEnvironment;
7
8 public final class BasicAgendaTree implements AgendaTree {
9
10 private final List<AgendaTreeEntry> entries;
11
12 public BasicAgendaTree(AgendaTreeEntry... entries) {
13 this.entries = Arrays.asList(entries);
14 }
15
16 public BasicAgendaTree(List<AgendaTreeEntry> entries) {
17 if (entries == null) {
18 throw new IllegalArgumentException("entries list was null");
19 }
20 this.entries = entries;
21 }
22
23 public void execute(ExecutionEnvironment environment) {
24 for (AgendaTreeEntry entry : entries) {
25 entry.execute(environment);
26 }
27 }
28
29 }