Class Period


  • public class Period
    extends Object
    Immutable period for retrieving statistics. A period of time is uniquely identified by its bounds, and not by its span. Two periods of time with the same span are different if they don't start at the same time.
    • Constructor Detail

      • Period

        public Period​(long start,
                      long end)
        Creates a new time Period from the specified start time to the specified end time. Both ends of the period are given as time stamps (the number of milliseconds from 1970-01-01T00:00:00Z)
        Parameters:
        start - The period start as the number of milliseconds from 1970-01-01T00:00:00Z
        end - The period end as the number of milliseconds from 1970-01-01T00:00:00Z
    • Method Detail

      • getStart

        public long getStart()
        Returns:
        The period start as the number of milliseconds from 1970-01-01T00:00:00Z
      • getEnd

        public long getEnd()
        Returns:
        The period end as the number of milliseconds from 1970-01-01T00:00:00Z
      • getStartCode

        public int getStartCode()
        Returns:
        The start of the period formatted with the associated formatter. Usually this is how the start of the period is stored in the database.
        See Also:
        getFormatter()
      • getEndCode

        public int getEndCode()
        Returns:
        The end of the period formatted with the associated formatter. Usually this is how the end of the period is stored in the database.
        See Also:
        getFormatter()