code: @Override
      protected void _to(ObjectOutput out) throws IOException {
          // XXX this can be improved
          out.writeInt(termParameterIndex.size());
          for (Map.Entry<Integer, List<Integer>> entry : termParameterIndex
                  .entrySet()) {
              // the keys and values of termParameterIndex are all non-null
              out.writeInt(entry.getKey().intValue());
              final List<Integer> parameters = entry.getValue();
              out.writeInt(parameters.size());
              for (Integer parameter : parameters) {
                  out.writeInt(parameter.intValue());
              }
          }
      }
docs: {@inheritDoc}