class WebPageDateEvaluator {

    public static RatedDate<ExtractedDate> getBestDate(Document document, PageDateType type) {
        Validate.notNull(document, "document must not be null");
        Validate.notNull(type, "type must not be null");

        List<RatedDate<ExtractedDate>> dates = getDates(document, type);
        if (dates.size() > 0) {
            RatedDate<ExtractedDate> bestRatedDate = dates.get(0);
            return bestRatedDate;
            
//            ExtractedDate bestDate = bestRatedDate.getDate();
//            if (bestDate instanceof ContentDate) {
//                ContentDate bestContentDate = (ContentDate)bestDate;
//                double size = 1 / bestContentDate.getRelSize();
//                double limit = 0;
//
//                // XXX are those strange thresholds really necessary?
//
//                if (0 < size && size <= 1) {
//                    limit = THRESHOLD_GROUP_1;
//                } else if (1 < size && size <= 2) {
//                    limit = THRESHOLD_GROUP_2;
//                } else if (2 < size && size <= 3) {
//                    limit = THRESHOLD_GROUP_3;
//                } else if (3 < size && size <= 5) {
//                    limit = THRESHOLD_GROUP_4;
//                } else if (5 < size && size <= 10) {
//                    limit = THRESHOLD_GROUP_5;
//                } else if (10 < size && size <= 20) {
//                    limit = THRESHOLD_GROUP_6;
//                } else if (20 < size && size <= 50) {
//                    limit = THRESHOLD_GROUP_7;
//                } else if (50 < size) {
//                    limit = THRESHOLD_GROUP_8;
//                }
//                if (bestRatedDate.getRate() >= limit) {
//                    return bestRatedDate;
//                }
//            }
        }
        return null;
    }

    private  WebPageDateEvaluator();

}