code: public boolean contains(Rect r) {
          // check for empty first
          return this.left < this.right && this.top < this.bottom
                  // now check for containment
                  && left <= r.left && top <= r.top && right >= r.right && bottom >= r.bottom;
      }
docs: Returns true iff the specified rectangle r is inside or equal to this
  rectangle. An empty rectangle never contains another rectangle.
  
  @param r The rectangle being tested for containment.
  
  @return true iff the specified rectangle r is inside or equal to this
  rectangle