# Ordering Index Vector with Java Streams

I bumped up against the following problem while doing some coding in Java 8 (and using streams where possible). Given a vector of objects \(x_1, \dots, x_N\) that come from some domain having an ordering \(\le\), find the vector of indices \(i_1, \dots, i_N\) that sorts the original values into ascending order, i.e., such that …