Class TimeWindow

java.lang.Object
noaa.coastwatch.render.feature.TimeWindow

public class TimeWindow extends Object
A TimeWindow represents a date and window centered around the date.
Since:
3.3.2
Author:
Peter Hollemans
  • Constructor Details

    • TimeWindow

      public TimeWindow(Date centralDate, long windowSize)
      Creates a new time window.
      Parameters:
      centralDate - the central date for the time window.
      windowSize - the time window size in milliseconds. Dates more than this duration before or after the central date are considered to be outside the window.
  • Method Details

    • getCentralDate

      public Date getCentralDate()
      Gets the central date for the time window.
      Returns:
      the central date.
    • getWindowSize

      public long getWindowSize()
      Gets the window size.
      Returns:
      the window size in milliseconds.
    • isInWindow

      public boolean isInWindow(Date date)
      Determines if a date is within the time window.
      Parameters:
      date - the date to check.
      Returns:
      true if the specified date is within the time window.
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • main

      public static void main(String[] argv) throws Exception
      Tests this class.
      Parameters:
      argv - the array of command line parameters.
      Throws:
      Exception