示例#1
0
 @Override
 protected void doAdd(int index, Vital element) {
   element.addListener(this);
   elementObserver.attachListener(element);
   vitals.add(index, element);
   numericList.forEach((fx) -> addNumeric(fx));
 }
示例#2
0
 @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;
 }