Class TimePeriodImpl

    • Constructor Detail

      • TimePeriodImpl

        public TimePeriodImpl​(IdGroupingToken groupId,
                              long startTimeSeconds,
                              long durationSeconds)
                       throws PlanItException
        Constructor
        Parameters:
        groupId - contiguous id generation within this group for instances of this class
        startTimeSeconds - start time in seconds from midnight
        durationSeconds - duration in seconds
        Throws:
        PlanItException - thrown if error
      • TimePeriodImpl

        public TimePeriodImpl​(IdGroupingToken groupId,
                              String description,
                              long startTimeSeconds,
                              long durationSeconds)
                       throws PlanItException
        Constructor
        Parameters:
        groupId - contiguous id generation within this group for instances of this class
        description - description of this time period
        startTimeSeconds - start time of this time period
        durationSeconds - duration of this time period
        Throws:
        PlanItException - thrown if error
      • TimePeriodImpl

        public TimePeriodImpl​(TimePeriodImpl timePeriodImpl)
        Copy constructor
        Parameters:
        timePeriodImpl - to copy
    • Method Detail

      • getStartTimeSeconds

        public long getStartTimeSeconds()
        Return the start time
        Specified by:
        getStartTimeSeconds in interface TimePeriod
        Returns:
        start time
      • getDurationSeconds

        public long getDurationSeconds()
        Return the duration in seconds
        Specified by:
        getDurationSeconds in interface TimePeriod
        Returns:
        duration
      • getDescription

        public String getDescription()
        Return the description
        Specified by:
        getDescription in interface TimePeriod
        Returns:
        description of this TimePeriod
      • toString

        public String toString()
        Output this object as a String
        Overrides:
        toString in class Object
        Returns:
        String containing the value of this TimePeriod