Class Dimension2Dd

java.lang.Object
org.jvision.geometry.Dimension2Dd

public class Dimension2Dd extends Object
An implementation of Dimension2D that enables to be constructed with double values.
Since:
1.0.0
Version:
"1.0.0" b202104211400L
Author:
Julien Seinturier - JOrigin - contact@jorigin.org - https://github.com/jorigin/jvision
  • Constructor Summary

    Constructors
    Constructor
    Description
    Dimension2Dd​(double width, double height)
    Construct a new dimension with given width and height.
  • Method Summary

    Modifier and Type
    Method
    Description
    double
    Get the height of this dimension.
    double
    Get the width of this dimension.
    void
    setSize​(double width, double height)
    Set the size of this dimension.
    Returns a string representation of the values of this Dimension2D object's height and width fields.

    Methods inherited from class java.lang.Object

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

    • Dimension2Dd

      public Dimension2Dd(double width, double height)
      Construct a new dimension with given width and height.
      Parameters:
      width - the width value.
      height - the height value.
  • Method Details

    • getWidth

      public double getWidth()
      Get the width of this dimension.
      Returns:
      the width of this dimension
      See Also:
      getHeight()
    • getHeight

      public double getHeight()
      Get the height of this dimension.
      Returns:
      the height of this dimension
      See Also:
      getWidth()
    • setSize

      public void setSize(double width, double height)
      Set the size of this dimension.
      Parameters:
      width - the width of this dimension
      height - the height of this dimension
    • toString

      public String toString()
      Returns a string representation of the values of this Dimension2D object's height and width fields. This method is intended to be used only for debugging purposes, and the content and format of the returned string may vary between implementations. The returned string may be empty but may not be null.
      Overrides:
      toString in class Object
      Returns:
      a string representation of this Dimension object