public void merge(Region r) {
    if (this.start == r.end + 1) {
      this.start = r.start;
    } else if (this.end == r.start - 1) {
      this.end = r.end;
    } else {
      throw new AssertionError("Ranges : Merge called on non contiguous values : [this]:" + this + " and " + r);
    }
    updateAvailable();
  }
public void merge ( Region r ) { if ( this . start == r . end + 1 ) { this . start = r . start ; } else if ( this . end == r . start - 1 ) { this . end = r . end ; } else { throw new AssertionError ( "Ranges : Merge called on non contiguous values : [this]:" + this + " and " + r ) ; } updateAvailable ( ) ; }
Merge the supplied region into this region (if they are adjoining).

@param r region to merge