Is that a Stream or a single [Sex]Tuple[t] object? In the case of Streams, let's imagine you have a List<Sextuplet>:-Line 1 creates a Stream<Sextuplet>. I haven't filtered the Stream or selected any of its elements or anything. Simply use all elements.
Line 2 uses the method reference to the getIndex() method, which I presume it has, to get it as an int and the Stream creates an IntStream.
Line 3: The IntStream#boxed() method turns the ints to Integers and creates a Stream<Integer>.
Line 4: You can use a Collector as an argument to the collect() method, but it is easier to go to the Collectors class, which has a method supplying just what you want.