< prev index next >

modules/base/src/main/java/javafx/collections/transformation/SortedList.java

Print this page
rev 9769 : 8139848: SortedList should provide a way to map source index to view index

*** 222,231 **** --- 222,236 ---- @Override public int getSourceIndex(int index) { return sorted[index].index; } + @Override + public int getViewIndex(int index) { + return perm[index]; + } + private void updatePermutationIndexes(Change<? extends E> change) { for (int i = 0; i < size; ++i) { int p = change.getPermutation(sorted[i].index); sorted[i].index = p; perm[p] = i;
< prev index next >