Enum RelativeTime

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<RelativeTime>

    public enum RelativeTime
    extends java.lang.Enum<RelativeTime>

    RelativeTime class.

    Version:
    $Id: $
    Author:
    DJ Gregor
    • Method Detail

      • values

        public static RelativeTime[] 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 (RelativeTime c : RelativeTime.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static RelativeTime valueOf​(java.lang.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:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.NullPointerException - if the argument is null
      • getStartDate

        protected java.util.Date getStartDate​(int offset)

        getStartDate

        Parameters:
        offset - a int.
        Returns:
        a Date object.
      • getStartOfToday

        protected java.util.Date getStartOfToday()

        getStartOfToday

        Returns:
        a Date object.
      • getStart

        public abstract java.util.Date getStart()

        getStart

        Returns:
        a Date object.
      • getEnd

        public abstract java.util.Date getEnd()

        getEnd

        Returns:
        a Date object.
      • setTimeKeeper

        public void setTimeKeeper​(TimeKeeper timeKeeper)

        setTimeKeeper

        Parameters:
        timeKeeper - a TimeKeeper object.
      • getCurrentTime

        protected long getCurrentTime()

        getCurrentTime

        Returns:
        a long.
      • getTimeZone

        protected java.util.TimeZone getTimeZone()
      • myTimeKeeper

        protected TimeKeeper myTimeKeeper()