public final class Dimension3D extends java.lang.Object implements java.io.Serializable
| Constructor and Description |
|---|
Dimension3D(double width,
double height,
double depth)
Creates a new
Dimension3D instance. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object obj)
Tests this instance for equality with an arbitrary object.
|
double |
getDepth()
Returns the depth.
|
double |
getDiagonalLength()
Returns the length of a diagonal from one corner of the box to another.
|
double |
getHeight()
Returns the height.
|
double |
getWidth()
Returns the width.
|
int |
hashCode()
Returns a hash code for this instance.
|
java.lang.String |
toString()
Returns a string representation of this instance, primarily for
debugging purposes.
|
public Dimension3D(double width, double height, double depth)
Dimension3D instance. Instances of this
class are immutable.width - the width.height - the height.depth - the depth.public double getWidth()
public double getHeight()
public double getDepth()
public double getDiagonalLength()
public boolean equals(java.lang.Object obj)
equals in class java.lang.Objectobj - the object to test against (null permitted).public int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Object