code: public Interval<T> includeBound(final Interval<T> target) {
  
          if (target.lowerBound.equals(target.upperBound)) { // target is a single-value interval
              if (!this.lowerBound.equals(this.upperBound)) {
                  if (this.upperBound.equals(target.upperBound)) {
                      this.upperBoundClosed = true;
                      return this;
                  } else if (this.lowerBound.equals(target.upperBound)) {
                      this.lowerBoundClosed = true;
                      return this;
                  } else {
                      throw new RuntimeException("Error! Cannot combine two separated interval");
                  }
              } else {
                  throw new RuntimeException("Error! Only support combine single value interval");
              }
          } else if (this.lowerBound.equals(this.upperBound)) { // (*this) is the single-value interval
              if (target.lowerBound.equals(target.upperBound)) {
                  throw new RuntimeException("Error! Only support combine single value interval");
              }
  
              if (target.lowerBound.equals(this.lowerBound)) {
                  this.lowerBound = target.lowerBound;
                  this.upperBound = target.upperBound;
                  this.lowerBoundClosed = true;
                  this.upperBoundClosed = target.upperBoundClosed;
  
                  return this;
              } else if (target.upperBound.equals(this.lowerBound)) {
                  this.lowerBound = target.lowerBound;
                  this.upperBound = target.upperBound;
                  this.lowerBoundClosed = target.lowerBoundClosed;
                  this.upperBoundClosed = true;
  
                  return this;
              } else {
                  throw new RuntimeException("Error! Cannot combine two separated interval");
              }
          } else {
              throw new RuntimeException("Error! Only support combine single value interval");
          }
      }
docs: Combine two interval, check if the bounds should be included Bug: not count use-cases when bounds are infinities.
  @param target
  @return