code: public boolean next()
  	{
  		if( state == 2 )
  			return false;
  		else
  			state = 1;
  
  		bins[c]++;
  
  		if( bins[c] >= N ) {
  			boolean allgood = false;
  			for( int i = c-1; i >= 0; i-- ) {
  				bins[i]++;
  
  				if( bins[i] <= (N-(k-i)) ) {
  					allgood = true;
  					for( int j = i + 1; j < k; j++ ) {
  						bins[j] = bins[j-1] + 1;
  					}
  					break;
  				}
  			}
  
  			if( !allgood ) {
  				state = 2;
  				// put it back into the last combination
  				for( int j = 0; j < bins.length; j++ ) {
  					bins[j] = j+N-bins.length;
  				}
  			}
  
  			return allgood;
  		}
  		return true;
  	}
docs: This will shuffle the elements in and out of the
  bins.  When all combinations have been exhausted
  an ExhaustedException will be thrown.
  
  @return true if the next combination was successfully found or false is it has been exhausted