InputThere is one Input. There are no constraints on the element type or on the number of elements in the stream. OutputThere is one Output. The output stream counts as many elements as the input stream counts, and the order (if any) is not affected. The type of the elements is a Tuple containing the rank (Integer) and the original element. ExampleIn this example, we associate a rank to every person regarding their age. The result is a stream of Tuples, each containing a person and a rank.
|