public class YDimension extends Object implements Comparable
An instance of this class implements the immutable design pattern.
Constructor and Description |
---|
YDimension(double width,
double height)
Creates a new YDimension2D object for given size.
|
Modifier and Type | Method and Description |
---|---|
int |
compareTo(Object o) |
boolean |
equals(Object o)
Tests a dimension to equality to another dimension.
|
double |
getHeight()
Gets the height of the dimension object.
|
double |
getWidth()
Gets the width of the dimension object.
|
int |
hashCode() |
String |
toString()
Returns the size in the form: "W: width H: height".
|
public YDimension(double width, double height)
public int compareTo(Object o)
compareTo
in interface Comparable
public boolean equals(Object o)
public final double getHeight()
public final double getWidth()