public Bounds windowView(Bounds rangeBounds){
  Bounds newBounds=new Bounds(this.start - rangeBounds.start,this.end - rangeBounds.start);
  if ((newBounds.start >= rangeBounds.size()) || (newBounds.end <= 0)) {
    return null;
  }
  newBounds.start=Math.max(newBounds.start,0);
  newBounds.end=Math.min(newBounds.end,rangeBounds.size());
  return newBounds;
}

public Bounds windowView ( Bounds rangeBounds ) { Bounds newBounds = new Bounds ( this . start - rangeBounds . start , this . end - rangeBounds . start ) ; if ( ( newBounds . start >= rangeBounds . size ( ) ) || ( newBounds . end <= 0 ) ) { return null ; } newBounds . start = Math . max ( newBounds . start , 0 ) ; newBounds . end = Math . min ( newBounds . end , rangeBounds . size ( ) ) ; return newBounds ; }
creates a new bounds object representing this interval relative a rangebounds interval . - - i . e : this [ 4 , 9 ] ; this . windowview ( [ 2 , 7 ] ) = = [ 2 , 7 ] when this bounds object is out of the window , windowview returns null .
