class DateExtractionHelper {

    public static <D extends ExtractedDate> List<D> filterExactest(List<D> dates) {
        DateExactness highestExactness = DateExactness.UNSET;
        for (D date : dates) {
            DateExactness currentExactness = date.getExactness();
            if (currentExactness.provides(highestExactness)) {
                highestExactness = currentExactness;
            }
        }
        List<D> result = new ArrayList<>();
        for (D date : dates) {
            if (date.getExactness() == highestExactness) {
                result.add(date);
            }
        }
        return result;
    }

    private  DateExtractionHelper();

}