public class Dimension extends AbstractDimension implements Serializable
Modifier and Type | Field and Description |
---|---|
double |
height
The magnitude in the y-dimension.
|
double |
width
The magnitude in the x-dimension.
|
Constructor and Description |
---|
Dimension()
Creates a dimension with magnitude (0, 0).
|
Dimension(double width,
double height)
Creates a dimension with the specified width and height.
|
Dimension(IDimension d)
Creates a dimension with width and height equal to the supplied dimension.
|
Modifier and Type | Method and Description |
---|---|
double |
height()
Returns the magnitude in the y-dimension.
|
void |
setSize(double width,
double height)
Sets the magnitudes of this dimension to the specified width and height.
|
void |
setSize(IDimension d)
Sets the magnitudes of this dimension to be equal to the supplied dimension.
|
double |
width()
Returns the magnitude in the x-dimension.
|
clone, equals, hashCode, toString
public double width
public double height
public Dimension()
public Dimension(double width, double height)
public Dimension(IDimension d)
public void setSize(double width, double height)
public void setSize(IDimension d)
public double width()
IDimension
width
in interface IDimension
public double height()
IDimension
height
in interface IDimension
Copyright © 2017. All rights reserved.