Class DateTypeConverter


  • public final class DateTypeConverter
    extends java.lang.Object
    Utility methods for Date classes.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static <D extends java.util.Date>
      D
      fromMillis​(long millis, java.lang.Class<D> type)
      Create a Date-related object from a timestamp in millis.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • fromMillis

        public static <D extends java.util.Date> D fromMillis​(long millis,
                                                              java.lang.Class<D> type)
        Create a Date-related object from a timestamp in millis.
        Type Parameters:
        D - date class to use
        Parameters:
        millis - timestamp in millis
        type - date type to use
        Returns:
        new instance of D or null if there was an error