I am looking for an effective way to create a list/map etc out of the below two lists, which I can use to get both current and past status of a rule.
List<Boolean> rulesCurrentStatus = new ArrayList<Boolean>(); // 3 Rules: false/true meaning if the rule passed of failed
rulesCurrentStatus.add(false);
rulesCurrentStatus.add(true);
rulesCurrentStatus.add(false);
List<Boolean> rulesPreviousStatus = new ArrayList<Boolean>(); // Previous state of the above 3 rules.
rulesPreviousStatus.add(true);
rulesPreviousStatus.add(true);
rulesPreviousStatus.add(false);
You can use Map with key of String type and value of Boolean type. You can differentiate between current and previous value using the key. e.g. Store all current values with key something similar C#1,C#2 and store previous values with key something similar P#1, P#2 etc.