Package hec.data
Class TimeWindowMap
java.lang.Object
hec.data.TimeWindowMap
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidadd(TimeWindow argTw) voidaddTimeWindow(Date startDate, boolean startInclusive, Date endDate, boolean endInclusive) Adds inclusive start and end points to the time window map.voidaddTimeWindow(Date startDate, boolean startInclusive, Date endDate, boolean endInclusive, boolean overrideProtection) voidclear()booleancontainedInTimeWindow(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.booleanisEmpty()intsize()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
-