code: public void replace(T item) throws IOException {
          removeAll((Class)item.getClass());
          data.add(item);
          onModified();
      }
docs: Removes all instances of the same type, then add the new one.