Class TimePeriod

java.lang.Object
noaa.coastwatch.util.TimePeriod
All Implemented Interfaces:
Comparable

public class TimePeriod extends Object implements Comparable
The TimePeriod class is a container for a date and length of time.
Since:
3.1.8
Author:
Peter Hollemans
  • Constructor Details

    • TimePeriod

      public TimePeriod(Date startDate, long duration)
      Creates a new time period.
      Parameters:
      startDate - the time period starting date.
      duration - the time period duration in milliseconds.
    • TimePeriod

      public TimePeriod(Date startDate, Date endDate)
      Creates a new time period.
      Parameters:
      startDate - the time period starting date.
      endDate - the time period ending date.
      Since:
      3.5.1
  • Method Details

    • getStartDate

      public Date getStartDate()
      Gets the time period starting date.
    • getDuration

      public long getDuration()
      Gets the time period duration in milliseconds.
    • getEndDate

      public Date getEndDate()
      Gets the time period ending date.
    • compareTo

      public int compareTo(Object o) throws ClassCastException
      Specified by:
      compareTo in interface Comparable
      Throws:
      ClassCastException