Ejemplo n.º 1
0
  /**
   * Matches this presumably wildcard date with a (that) necessarily specifically defined date to
   * determine if (true) the given date is one of this' defined dates or (false) not.
   *
   * @param that the specific date with which to compare.
   * @return
   */
  @Override
  public boolean matches(Date that) {
    if (!that.isSpecific())
      throw new BACnetRuntimeException("Dates for matching must be completely specified: " + that);

    if (!matchYear(that.year)) return false;

    if (!month.matches(that.month)) return false;

    if (!matchDay(that)) return false;

    if (!dayOfWeek.matches(that)) return false;

    return true;
  }