Package hec.data
Class TimeWindowMap
java.lang.Object
hec.data.TimeWindowMap
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
add
(TimeWindow argTw) void
addTimeWindow
(Date startDate, boolean startInclusive, Date endDate, boolean endInclusive) Adds inclusive start and end points to the time window map.void
addTimeWindow
(Date startDate, boolean startInclusive, Date endDate, boolean endInclusive, boolean overrideProtection) void
clear()
boolean
containedInTimeWindow
(Date date, boolean dateInclusive) getTimeWindowMap
(boolean startDateKey) Generates a navigable map of the time windows from indexed by the start or end date.Returns a set of the time windows contained in the map.boolean
isEmpty()
int
size()
Returns the number of time windows.
-
Constructor Details
-
TimeWindowMap
public TimeWindowMap()
-
-
Method Details
-
addTimeWindow
public void addTimeWindow(Date startDate, boolean startInclusive, Date endDate, boolean endInclusive) Adds inclusive start and end points to the time window map.- Parameters:
startDate
-endDate
-
-
addTimeWindow
-
add
-
clear
public void clear() -
getTimeWindowSet
Returns a set of the time windows contained in the map. This routine is faster than getting the time window map.- Returns:
-
size
public int size()Returns the number of time windows.- Returns:
-
isEmpty
public boolean isEmpty() -
getTimeWindowMap
Generates a navigable map of the time windows from indexed by the start or end date. This routine uses the getTimeWindowSet() call.- Parameters:
startDateKey
- controls whether the key is the start or end date.- Returns:
-
containedInTimeWindow
-