@Test public void getWidthTest() { Rectangle rectangle = create(1, 2, 3, 4); Assert.assertEquals(2, rectangle.getWidth(), 0); }
public double getWidth() { return this.right - this.left; }
Rectangle implements Serializable { public double getWidth() { return this.right - this.left; } }
Rectangle implements Serializable { public double getWidth() { return this.right - this.left; } Rectangle(double left, double top, double right, double bottom); }
Rectangle implements Serializable { public double getWidth() { return this.right - this.left; } Rectangle(double left, double top, double right, double bottom); boolean contains(Point point); Rectangle enlarge(double left, double top, double right, double bottom); Rectangle envelope(double padding); @Override boolean equals(Object obj); Point getCenter(); double getCenterX(); double getCenterY(); double getHeight(); double getWidth(); @Override int hashCode(); boolean intersects(Rectangle rectangle); boolean intersectsCircle(double pointX, double pointY, double radius); Rectangle shift(Point origin); @Override String toString(); }
Rectangle implements Serializable { public double getWidth() { return this.right - this.left; } Rectangle(double left, double top, double right, double bottom); boolean contains(Point point); Rectangle enlarge(double left, double top, double right, double bottom); Rectangle envelope(double padding); @Override boolean equals(Object obj); Point getCenter(); double getCenterX(); double getCenterY(); double getHeight(); double getWidth(); @Override int hashCode(); boolean intersects(Rectangle rectangle); boolean intersectsCircle(double pointX, double pointY, double radius); Rectangle shift(Point origin); @Override String toString(); final double bottom; final double left; final double right; final double top; }