java.lang.Object
org.projecthusky.communication.xdsmhdconversion.model.XdsTimeRange

public class XdsTimeRange extends Object
Specifies a time range where the lower bound is inclusive and the upper bound is exclusive.
Author:
Quentin Ligier
  • Constructor Details

    • XdsTimeRange

      public XdsTimeRange()
  • Method Details

    • setLower

      public void setLower(@Nullable Instant lower)
      Sets the lower bound of the time range. It shall not be later than the upper bound, but can be the same instant.
      Parameters:
      lower - The lower bound.
      Throws:
      IllegalArgumentException - if the lower bound is after the upper one.
    • setUpper

      public void setUpper(@Nullable Instant upper)
      Sets the upper bound of the time range. It shall not be sooner than the lower bound, but can be the same instant.
      Parameters:
      upper - The upper bound.
      Throws:
      IllegalArgumentException - if the upper bound is before the lower one.
    • hasDuration

      public boolean hasDuration()
      Returns whether the time range has a duration (i.e. a lower and a upper bounds) or not.