@Override protected void doAdd(int index, Vital element) { element.addListener(this); elementObserver.attachListener(element); vitals.add(index, element); numericList.forEach((fx) -> addNumeric(fx)); }
@Override protected Vital doSet(int index, Vital element) { Vital removed = vitals.set(index, element); removed.removeListener(this); elementObserver.detachListener(removed); elementObserver.attachListener(element); removed.addListener(this); numericList.forEach((fx) -> addNumeric(fx)); return removed; }