code: public void replace(T from, T to) throws IOException {
          List<T> copy = new ArrayList<>(data.getView());
          for (int i=0; i<copy.size(); i++) {
              if (copy.get(i).equals(from))
                  copy.set(i,to);
          }
          data.replaceBy(copy);
      }
docs: A convenience method to replace a single item.
  
  This method shouldn't be used when you are replacing a lot of stuff
  as copy-on-write semantics make this rather slow.