/** * Returns the evaluator states *for the given instance. * * @param instance The key to use to identify the instance to get states for. Can be null to get the default instance * @return a {@link java.util.List} object. */ public List<ThresholdEvaluatorState> getThresholdEvaluatorStates(String instance) { List<ThresholdEvaluatorState> result= m_thresholdEvaluatorStates.get(instance); if(result==null) { //There is no set of evaluators for this instance; create a list by copying the base ones List<ThresholdEvaluatorState> defaultList=m_thresholdEvaluatorStates.get(null); //Create the new list result=new LinkedList<ThresholdEvaluatorState>(); for(ThresholdEvaluatorState state: defaultList) { result.add(state.getCleanClone()); } //Store the new list with the instance as the key m_thresholdEvaluatorStates.put(instance == null ? null : instance.intern(), result); } return result; }