public void sortAndRetain(){
  Collections.sort(counterList,this.descending ? DESC_COMPARATOR : ASC_COMPARATOR);
  retain(capacity);
  ordered=true;
}

public void sortAndRetain ( ) { Collections . sort ( counterList , this . descending ? DESC_COMPARATOR : ASC_COMPARATOR ) ; retain ( capacity ) ; ordered = true ; }
sort and keep the expected size ;
