Enum TimeFormat

    • Enum Constant Detail

      • DATE

        public static final TimeFormat DATE
        Date representation.
      • DATETIME

        public static final TimeFormat DATETIME
        Date and time representation.
      • DOUBLE

        public static final TimeFormat DOUBLE
        Date represented as a double number.
    • Method Detail

      • values

        public static TimeFormat[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (TimeFormat c : TimeFormat.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static TimeFormat valueOf​(String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        IllegalArgumentException - if this enum type has no constant with the specified name
        NullPointerException - if the argument is null
      • parse

        public abstract double parse​(String str)
        Parses the given string into the time format.
        Parameters:
        str - the string to parse
        Returns:
        the time, in milliseconds
      • print

        public abstract String print​(double time)
        Prints the given time in this format.
        Parameters:
        time - the time
        Returns:
        a formatted time