Package noaa.coastwatch.render.feature
Class TimeWindow
java.lang.Object
noaa.coastwatch.render.feature.TimeWindow
A
TimeWindow
represents a date and window centered around
the date.- Since:
- 3.3.2
- Author:
- Peter Hollemans
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Gets the central date for the time window.long
Gets the window size.boolean
isInWindow
(Date date) Determines if a date is within the time window.static void
Tests this class.toString()
-
Constructor Details
-
TimeWindow
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
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
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
-
toString
-
main
Tests this class.- Parameters:
argv
- the array of command line parameters.- Throws:
Exception
-