source.ucregents.playground.physics
Class DimensionDouble

java.lang.Object
  extended by java.awt.geom.Dimension2D
      extended by source.ucregents.playground.physics.DimensionDouble
All Implemented Interfaces:
java.lang.Cloneable

public class DimensionDouble
extends java.awt.geom.Dimension2D

Dimension stores a pair of numbers as doubles and provides the means to modify them.


Constructor Summary
DimensionDouble(DimensionDouble dd)
          This constructs a copy of another DimensionDouble
DimensionDouble(double w, double h)
          Constructs a new DimensionDouble with width w and height h.
 
Method Summary
 double getHeight()
          Accessor for the demsion's height
 double getWidth()
          Accessor for the demsion's width
 void setSize(double w, double h)
          Mutator for both the width and the height of the dimension
 
Methods inherited from class java.awt.geom.Dimension2D
clone, setSize
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DimensionDouble

public DimensionDouble(DimensionDouble dd)
This constructs a copy of another DimensionDouble

Parameters:
dd - The dimension to copy

DimensionDouble

public DimensionDouble(double w,
                       double h)
Constructs a new DimensionDouble with width w and height h.

Parameters:
w - The width
h - The height
Method Detail

getHeight

public double getHeight()
Accessor for the demsion's height

Specified by:
getHeight in class java.awt.geom.Dimension2D
Returns:
The dimension's height

getWidth

public double getWidth()
Accessor for the demsion's width

Specified by:
getWidth in class java.awt.geom.Dimension2D
Returns:
The dimension's width

setSize

public void setSize(double w,
                    double h)
Mutator for both the width and the height of the dimension

Specified by:
setSize in class java.awt.geom.Dimension2D
Parameters:
w - The new width
h - The new height