public class RectangleSize extends Object
| Constructor and Description |
|---|
RectangleSize(int width,
int height)
Creates a new RectangleSize instance.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
int |
getHeight() |
int |
getWidth() |
int |
hashCode() |
static RectangleSize |
parse(String size)
Parses a string into a {link RectangleSize} instance.
|
String |
toString() |
public RectangleSize(int width,
int height)
width - The width of the rectangle.height - The height of the rectangle.public int getWidth()
public int getHeight()
public static RectangleSize parse(String size)
size - A string representing width and height separated by "x".public boolean equals(Object obj)
equals in class Objectobj - A RectangleSize instance to be
checked for equality with the current instance.true if and only if the input objects are equal by
value, false otherwise.Copyright © 2015. All rights reserved.