@ SuppressWarnings ( "unchecked" ) public T [ ] nextCombinationAsArray ( ) { T [ ] combination = ( T [ ] ) Array . newInstance ( elements . getClass ( ) . getComponentType ( ) , combinationIndices . length ) ; return nextCombinationAsArray ( combination ) ; }
Generate the next combination and return an array containing the appropriate elements .