code: public boolean contains(final Interval<T> i) {
  
          int compareLow, compareUp;
          compareLow = this.lowerBound.compareTo(i.lowerBound);
          compareUp = this.upperBound.compareTo(i.upperBound);
  
          if (compareLow < 0) {
              // check the upper bound
              if (compareUp > 0) {
                  return true;
              } else if ((compareUp == 0) &&
                      (this.upperBoundClosed || !i.upperBoundClosed)) {
                  return true;
              }
          } else if (compareLow == 0) {
              if (this.lowerBoundClosed || !i.lowerBoundClosed) { // lowerbound satisfied
                  {
                      // check upperbound
                      if (compareUp > 0) {
                          return true;
                      } else if ((compareUp == 0) &&
                              (this.upperBoundClosed || !i.upperBoundClosed)) {
                          return true;
                      }
                  }
              }
          }
          return false;
      }
docs: Return true if interval in  the argument is the subset of the current interval.
  
  @param i
  @return