docs: public void prepareCommit() {
  
          if (m_baseCollection instanceof List) {
              List<?> list = (List<?>)m_baseCollection;
              list.clear();
          } else if (m_baseCollection instanceof SortedMap) {
              SortedMap<?, ?> map = (SortedMap<?, ?>)m_baseCollection;
              map.clear();
          }
      }