Class Dimension3D

java.lang.Object
org.jfree.chart3d.graphics3d.Dimension3D
All Implemented Interfaces:
Serializable

public final class Dimension3D extends Object implements Serializable
A dimension in 3D (width, height and depth). Instances of this class are immutable.

NOTE: This class is serializable, but the serialization format is subject to change in future releases and should not be relied upon for persisting instances of this class.
See Also:
  • Constructor Summary

    Constructors
    Constructor
    Description
    Dimension3D(double width, double height, double depth)
    Creates a new Dimension3D instance.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Tests this instance for equality with an arbitrary object.
    double
    Returns the depth.
    double
    Returns the length of a diagonal from one corner of the box to another.
    double
    Returns the height.
    double
    Returns the width.
    int
    Returns a hash code for this instance.
    Returns a string representation of this instance, primarily for debugging purposes.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • Dimension3D

      public Dimension3D(double width, double height, double depth)
      Creates a new Dimension3D instance. Instances of this class are immutable.
      Parameters:
      width - the width.
      height - the height.
      depth - the depth.
  • Method Details

    • getWidth

      public double getWidth()
      Returns the width.
      Returns:
      The width.
    • getHeight

      public double getHeight()
      Returns the height.
      Returns:
      The height.
    • getDepth

      public double getDepth()
      Returns the depth.
      Returns:
      The depth.
    • getDiagonalLength

      public double getDiagonalLength()
      Returns the length of a diagonal from one corner of the box to another.
      Returns:
      The length.
    • equals

      public boolean equals(Object obj)
      Tests this instance for equality with an arbitrary object.
      Overrides:
      equals in class Object
      Parameters:
      obj - the object to test against (null permitted).
      Returns:
      A boolean.
    • hashCode

      public int hashCode()
      Returns a hash code for this instance.
      Overrides:
      hashCode in class Object
      Returns:
      A hash code.
    • toString

      public String toString()
      Returns a string representation of this instance, primarily for debugging purposes.
      Overrides:
      toString in class Object
      Returns:
      A string.