RuleSet getRuleSet()
{
if (!ok)
return null;
RuleSet ruleSet = new RuleSet();
for (Map.Entry<Rule<?>, Object> entry : rules.entrySet())
{
switch (entry.getKey().getType())
{
case INTEGER:
ruleSet.setValue(entry.getKey(), ((JSpinner)entry.getValue()).getValue().toString());
break;
case BOOLEAN:
case TRANSACTION_AVAILABILITY:
case RED_SHIFT_ROLL_TYPE:
ruleSet.setValue(entry.getKey(), ((JComboBox)entry.getValue()).getSelectedItem().toString());
break;
}
}
return ruleSet;