Package hec.data

Class TimeWindowMap

java.lang.Object
hec.data.TimeWindowMap

public class TimeWindowMap extends Object
  • 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

      public void addTimeWindow(Date startDate, boolean startInclusive, Date endDate, boolean endInclusive, boolean overrideProtection)
    • add

      public void add(TimeWindow argTw)
    • clear

      public void clear()
    • getTimeWindowSet

      public Set<TimeWindow> 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

      public NavigableMap<Date,TimeWindow> getTimeWindowMap(boolean startDateKey)
      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

      public boolean containedInTimeWindow(Date date, boolean dateInclusive)