public static < T > Set < Set < T > > combinations ( Set < T > elements , int subsetSize ) { return combinationsStream ( elements , subsetSize ) . collect ( Collectors . toSet ( ) ) ; }
Returns all the possible combinations of the set .