Class XY

All Implemented Interfaces:
Cloneable

public final class XY extends GSeriesValue
The X/Y series value.
Author:
Christopher Mindus
  • Field Details

    • x

      public final double x
      The X value. An unspecified value is Double.NaN.
    • y

      public final double y
      The Y value. An unspecified value is Double.NaN.
  • Constructor Details

    • XY

      public XY(double x, double y)
      Constructor for the X/Y value point.
      Parameters:
      x - The X value, Double.NaN for no value.
      y - The Y value, Double.NaN for no value.
  • Method Details

    • getType

      public SeriesType getType()
      Gets the fill type.
      Specified by:
      getType in class GSeriesValue
      Returns:
      X_Y.
    • equals

      public boolean equals(Object o)
      Checks if two fill objects are equal.

      Compared with Double.compare(double,double) on the value plus 0.0, not with ==: an unspecified value is Double.NaN and NaN==NaN is false. Adding 0.0 folds -0.0 into +0.0 so this agrees with hashCode().

      Specified by:
      equals in class GSeriesValue
    • hashCode

      public int hashCode()
      Gets the hash code of this instance, consistent with equals: x and y.
      Overrides:
      hashCode in class Object
      Returns:
      The hash code.