Class DateToLongConverter

  • All Implemented Interfaces:
    StringConverter<java.util.Date>, java.io.Serializable

    public class DateToLongConverter
    extends java.lang.Object
    implements StringConverter<java.util.Date>
    Represent a Date with String representation of epoch millis.
    See Also:
    Serialized Form
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String asString​(java.util.Date what)
      Convert type to string.
      java.util.Date fromString​(java.lang.String what)
      Convert type from string.
      java.util.Date max()
      Retrieve maximal element.
      java.util.Date min()
      Retrieve minimal element
      • Methods inherited from class java.lang.Object

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

      • DateToLongConverter

        public DateToLongConverter()
    • Method Detail

      • asString

        public java.lang.String asString​(java.util.Date what)
        Description copied from interface: StringConverter
        Convert type to string.
        Specified by:
        asString in interface StringConverter<java.util.Date>
        Parameters:
        what - input type
        Returns:
        string representation of what
      • fromString

        @Nullable
        public java.util.Date fromString​(java.lang.String what)
        Description copied from interface: StringConverter
        Convert type from string.
        Specified by:
        fromString in interface StringConverter<java.util.Date>
        Parameters:
        what - string representation
        Returns:
        the original object
      • max

        public java.util.Date max()
        Description copied from interface: StringConverter
        Retrieve maximal element.
        Specified by:
        max in interface StringConverter<java.util.Date>
        Returns:
        instance of maximal object
      • min

        public java.util.Date min()
        Description copied from interface: StringConverter
        Retrieve minimal element
        Specified by:
        min in interface StringConverter<java.util.Date>
        Returns:
        instance of minimal object