integer++;
}
map.put(s, integer);
}
AndExpression a = new AndExpression(new BooleanCondition(true));
List<String> states = Arrays.asList(allStates);
for (Entry<String, Integer> e : map.entrySet()) {
int i = states.indexOf(e.getKey());
a.addCondition(new StateCondition(i, e.getValue(), e.getValue()));
}
return new CARule(new CurrentStateCondition(states.indexOf(currentState)),
a, states.indexOf(targetState), 1d);
}