示例#1
0
 public void sort(Sorter sorter) {
   synchronized (fChildrenLock) {
     for (T each : getFilteredChildren()) {
       sorter.apply(each);
     }
     List<T> sortedChildren = new ArrayList<T>(getFilteredChildren());
     Collections.sort(sortedChildren, comparator(sorter));
     fFilteredChildren = Collections.unmodifiableCollection(sortedChildren);
   }
 }
示例#2
0
 private void sortChild(T child) {
   fSorter.apply(child);
 }