@Override
  public synchronized boolean retainAll(Collection<?> c) {
    ArrayList<E> newList = new ArrayList<>(list);
    // Removals in ArrayList won't break sorting
    boolean changed = newList.retainAll(c);
    list = Collections.unmodifiableList(newList);
    return changed;
  }
Returns a reference to the unmodifiable list currently backing the SortedList. Changes to the
SortedList will not be reflected in this list. Use this method to get a reference for iterating
over using the RandomAccess pattern.
hbase-server/src/main/java/org/apache/hadoop/hbase/util/SortedList.java