code: private long getFrequentItemsets(PrintStream out, List<ItemSet> list) {
          long n = 0;
          if (root.children != null) {
              for (int i = 0; i < root.children.length; i++) {
                  Node child = root.children[i];
                  if (child != null && child.support >= minSupport) {
                      int[] itemset = {child.id};
                      n += getFrequentItemsets(out, list, itemset, i, child);
                  }
              }
          }
          
          return n;
      }
docs: Returns the set of frequent item sets.
  @param out a print stream for output of frequent item sets.
  @param list a container to store frequent item sets on output.
  @return the number of discovered frequent item sets