code: public List<Parameter> getAllParameters() {
          List<Parameter> ret = new ArrayList<Parameter>();
  
          ret.addAll(subject.getAllParameters());
  
          if (object != null) {
              if (object.getStatement() != null)
                  ret.addAll(object.getStatement()
                          .getAllParameters());
              else
                  ret.addAll(object.getTerm().getAllParameters());
          }
  
          return ret;
      }
docs: Returns a list of all parameters contained by this statement and object.
  
  @return List of parameters