Class Offset2D

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

public final class Offset2D extends Object implements Serializable
An offset (dx, dy) in two dimensional space. 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:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final Offset2D
    Zero offset.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Default constructor ((0, 0)).
    Offset2D(double dx, double dy)
    Creates a new instance.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Tests this instance for equality with an arbitrary object.
    double
    Returns the x-offset.
    double
    Returns the y-offset.
    int
    Returns a hash code for this instance.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • Constructor Details

    • Offset2D

      public Offset2D()
      Default constructor ((0, 0)).
    • Offset2D

      public Offset2D(double dx, double dy)
      Creates a new instance.
      Parameters:
      dx - the x-offset.
      dy - the y-offset.
  • Method Details

    • getDX

      public double getDX()
      Returns the x-offset.
      Returns:
      The x-offset.
    • getDY

      public double getDY()
      Returns the y-offset.
      Returns:
      The y-offset.
    • equals

      public boolean equals(Object obj)
      Tests this instance for equality with an arbitrary object.
      Overrides:
      equals in class Object
      Parameters:
      obj - the object (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.