@Override
	public List<T> next() {
		if (!hasNext())
			throw new NoSuchElementException();

		if (arr[1] == 0) {
			for (int i = 0; i < arr.length; i++)
				arr[i] = i;
		} else {
			int k = arr.length, n = source.size(), i = k - 1;

			for (; i > 0 && arr[i] == n - k + i; i--)
				;

			arr[i++]++;
			for (; i < k; arr[i] = arr[i++ - 1] + 1)
				;
		}

		ArrayList<T> ret = new ArrayList<T>(arr.length);
		for (int j : arr) {
			ret.add(source.get(j));
		}
		return ret;

	}