public class Size2D
extends java.lang.Object
implements java.io.Serializable
| Constructor and Description |
|---|
Size2D(int width,
int height)
Creates a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(@Nullable java.lang.Object obj) |
int |
getHeight()
Returns the height of the area.
|
int |
getWidth()
Returns the width of the area.
|
int |
hashCode() |
java.lang.String |
toString() |
public static final Size2D ONE
public Size2D(int width,
int height)
width - the width of the area; must be greater than zeroheight - the height of the area; must be greater than zerojava.lang.IllegalArgumentException - in case width or height
is less than 1.public boolean equals(@Nullable
@Nullable java.lang.Object obj)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic int getWidth()
public int getHeight()
public java.lang.String toString()
toString in class java.lang.Object