code: public HourRange joinWithNextDay(@NotNull final HourRange other) {
          Contract.requireArgNotNull("other", other);
          if (!this.to.equals(new Hour(24, 0))) {
              throw new ConstraintViolationException("The 'to' hour value of this instance is not '24:00', but was: '" + this.to + "'");
          }
          if (!other.from.equals(new Hour(0, 0))) {
              throw new ConstraintViolationException(
                      "The 'from' hour value of the other instance is not '00:00', but was: '" + other.from + "'");
          }
          final int thisClosedMinutes = getClosedMinutes();
          final int otherOpenMinutes = other.getOpenMinutes();
          if (otherOpenMinutes > thisClosedMinutes) {
              throw new ConstraintViolationException(
                      "The hour range of the other instance cannot be greater than hours not used by this instance: this='" + this
                              + "', other='" + other + "'");
          }
          if (this.from.equals(other.to)) {
              return new HourRange("00:00-24:00");
          }
          return new HourRange(this.from, other.to);
      }
docs: Appends a single hour range to this one and returns a new instance. This is only allowed if this instance has 'to=24:00' and
  'from=00:00' for the other instance.
  
  @param other
  Range start starts with '00:00'
  
  @return New instance with "from" taken from this instance and 'to' taken from the other one.