SHARE
TWEET

Untitled

advictoriam Feb 6th, 2019 66 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /**
  2.    Manages modifications to rectangle objects
  3. */
  4.  
  5. import java.awt.Rectangle;
  6. public class RectangleManager implements Adjuster
  7. {
  8.    RectangleManager(){}
  9.    
  10.    public Object adjustDimensions(Object o, int w, int h)
  11.    {
  12.       int width = (int)((Rectangle)(o)).getWidth();
  13.       int height = (int)((Rectangle)(o)).getHeight();
  14.       return new Rectangle(width + w, height + h);
  15.    }
  16. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top