code: public static <T> Stream<Set<T>> combinationsStream(Set<T> elements, int subsetSize) {
          if (subsetSize == 0) {
              return Stream.of(new HashSet<>());
          }
          else if (subsetSize <= elements.size()) {
              Set<T> remainingElements = elements;
  
              Iterator<T> it = remainingElements.iterator();
              T X = it.next();
              it.remove();
  
              Stream<Set<T>> combinations = Stream.concat(
                      combinationsStream(remainingElements, subsetSize), //exclude X
                      combinationsStream(remainingElements, subsetSize-1).map(s -> {s.add(X); return s;}) //include X
              );
  
              remainingElements.add(X);
  
              return combinations;
          }
          else {
              return Stream.empty();
          }
      }
docs: Returns all the possible combinations of the set in a stream.
  
  Heavily Modified code:
  http://codereview.stackexchange.com/questions/26854/recursive-method-to-return-a-set-of-all-combinations
  
  @param elements
  @param subsetSize
  @param <T>
  @return