code: public List<Parameter> getAllParameters() {
          List<Parameter> ret = new ArrayList<Parameter>();
  
          if (parameters != null)
              ret.addAll(parameters);
  
          if (terms != null) {
              for (final Term t : terms) {
                  ret.addAll(t.getAllParameters());
              }
          }
  
          return ret;
      }
docs: Returns a list of all parameters contained by both this term and any
  nested terms.
  
  @return Non-null list of parameters