Class Simple

All Implemented Interfaces:
Cloneable

public final class Simple extends GSeriesValue
The simple series value is a number.
Author:
Christopher Mindus
  • Field Details

    • number

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

    • Simple

      public Simple(double number)
      Constructor for a simple number.
      Parameters:
      number - The number, or Double.NaN for no value.
  • Method Details

    • getType

      public SeriesType getType()
      Gets the fill type.
      Specified by:
      getType in class GSeriesValue
      Returns:
      SIMPLE.
    • 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: the number.
      Overrides:
      hashCode in class Object
      Returns:
      The hash code.