sortLike method

void sortLike(
  1. Iterable ordering
)

Sorts this list according to the order specified by the ordering iterable. Items which don't appear in ordering will be included in the end, in their original order. Items of ordering which are not found in the original list are ignored.

Implementation

void sortLike(Iterable ordering) {
  final List<T> result = sortedLike(ordering);
  clear();
  addAll(result);
}