Files
corejava/corejava第10版/v2ch08/rect/Rectangle.java
T
2019-05-22 19:31:49 +08:00

19 lines
508 B
Java

package rect;
import sourceAnnotations.ToString;
@ToString
public class Rectangle {
private Point topLeft;
private int width;
private int height;
public Rectangle(Point topLeft, int width, int height) {
this.topLeft = topLeft;
this.width = width;
this.height = height;
}
@ToString(includeName=false) public Point getTopLeft() { return topLeft; }
@ToString public int getWidth() { return width; }
@ToString public int getHeight() { return height; }
}