Java Date Compare max(Set dateSet)

Here you can find the source of max(Set dateSet)

Description

max

License

Apache License

Declaration

public static Date max(Set<Date> dateSet) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

import java.util.*;

public class Main {
    public static Date max(Set<Date> dateSet) {
        return (Date) new ArrayList(dateSet).stream().max(new Comparator<Date>() {
            @Override/*  w  w w  .  j  ava 2 s  . co m*/
            public int compare(Date o1, Date o2) {
                return o1.compareTo(o2);
            }
        }).get();
    }
}

Related

  1. isBeforeDate(String sCompareDate)
  2. isInDate(Date date, Date compareDate)
  3. max(Collection datumok)
  4. max(Date a, Date b)
  5. max(final Date a, final Date b)
  6. mergeNonDateKeys(List rowKeys, List columnKeys)
  7. min(Calendar... dates)
  8. min(Date datum1, Date datum2)
  9. sameTimeInOneMinute(Date date1, Date date2)