public class Dimension extends Object
Constructor and Description |
---|
Dimension()
Creates a new instance of Dimension
|
Dimension(Dimension d)
Creates a new instance of Dimension with a predefine dimension
|
Dimension(int width,
int height)
CCreates a new instance of Dimension with width and height
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object arg0)
Indicates whether some other object is "equal to" this one.
|
int |
getHeight()
Return the height of the dimension
|
int |
getWidth()
Returns the width of the dimension
|
int |
hashCode()
Returns a hash code value for the object.
|
void |
setHeight(int height)
Set the height of the dimension
|
void |
setWidth(int width)
Set the width of the dimension
|
String |
toString()
Returns a string representation of the object.
|
public Dimension()
public Dimension(Dimension d)
d
- Dimension to copypublic Dimension(int width, int height)
width
- the dimention widthheight
- the dimention heightpublic void setWidth(int width)
width
- the dimention widthpublic void setHeight(int height)
height
- the dimention heightpublic int getWidth()
public int getHeight()
public String toString()
public int hashCode()
public boolean equals(Object arg0)