class ResultsSorter {

    private void sortChanged(ObservableValue<? extends String> observable, String oldValue, String newValue)
    {
        myEvent = true;
        if (SearchModel.RELEVANCE_SORT.equals(newValue))
        {
            myModel.getShownResults().sort(this::compareRelevance);
        }
        else if (SearchModel.NAME_SORT.equals(newValue))
        {
            myModel.getShownResults().sort(this::compareName);
        }
        myEvent = false;
    }

    public  ResultsSorter(SearchModel model);

}