code: @SuppressWarnings("unchecked")
      public <T extends Tree> List<T> getLeaves(List<T> list) {
          if (isLeaf()) {
              list.add((T) this);
          } else {
              for (Tree kid : children()) {
                  kid.getLeaves(list);
              }
          }
          return list;
      }
docs: Gets the leaves of the tree.
  
  @param list The list in which the leaves of the tree will be
  placed. Normally, this will be empty when the routine is called,
  but if not, the new yield is added to the end of the list.
  @return a <code>List</code> of the leaves.