code: public Range[] split(Range that){
          boolean position[] = position(that);
  
          Range before = null;
          if(position[0])
              before = new Range(this.min,  Math.min(this.max, that.min-1));
  
          Range after = null;
          if(position[2])
              after = new Range(Math.max(this.min, that.max+1), this.max);
  
          Range inside = null;
          if(position[1])
              inside = new Range(Math.max(this.min, that.min), Math.min(this.max, that.max));
  
          return new Range[]{ before, inside, after };
      }
docs: this method splits this range into 3 regions with respect to given range
  <p><br>
  the return value is Range array of size 3.<br>
  <blockquote>
  1st range ==> the portion of this range that is before given range<br>
  2nd range ==> the portion of range that is common to this range and given range<br>
  3rd range ==> the portion of this range that is after given range.
  </blockquote>
  Note that the values in returned array can be null, if there is no range satifying
  the requirement.