@Override public Set<IConcept> getObservables() { if (this.observables == null) { this.observables = new HashSet<IConcept>(); for (IModel m : models) this.observables.add(m.getObservableClass()); } return this.observables; }
/** * Add observables that were not defined, substitute those that were with the incoming ones. * * @param scenario */ public void merge(Scenario scenario) { for (IModel m : scenario.models) { int i = 0; for (IModel om : models) { if (m.getObservableClass().is(om.getObservableClass())) { models.set(i, m); break; } i++; } if (i == models.size()) { models.add(m); editableData.add(((Model) m).editable); } } }