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