/** * Updates the comparator in use and applies it to the table. */ protected void rebuildComparator() { final Comparator<E> rebuiltComparator = sortingState.buildComparator(); // select the new comparator sortedList.getReadWriteLock().writeLock().lock(); try { sortedListComparator = rebuiltComparator; sortedList.setComparator(rebuiltComparator); } finally { sortedList.getReadWriteLock().writeLock().unlock(); } }
/** * Updates the comparator in use and applies it to the table. */ protected void rebuildComparator() { final Comparator<E> rebuiltComparator = sortingState.buildComparator(); // select the new comparator sortedList.getReadWriteLock().writeLock().lock(); try { sortedListComparator = rebuiltComparator; sortedList.setComparator(rebuiltComparator); } finally { sortedList.getReadWriteLock().writeLock().unlock(); } }
/** * Updates the comparator in use and applies it to the table. */ protected void rebuildComparator() { final Comparator<E> rebuiltComparator = sortingState.buildComparator(); // select the new comparator sortedList.getReadWriteLock().writeLock().lock(); try { sortedListComparator = rebuiltComparator; sortedList.setComparator(rebuiltComparator); } finally { sortedList.getReadWriteLock().writeLock().unlock(); } }
sortedList.getReadWriteLock().writeLock().lock(); try { sortedList.setComparator(comparator); } finally { sortedList.getReadWriteLock().writeLock().unlock();
sortedList.getReadWriteLock().writeLock().lock(); try { sortedList.setComparator(comparator); } finally { sortedList.getReadWriteLock().writeLock().unlock();