Class YWithXInterval

  • All Implemented Interfaces:
    java.io.Serializable

    public class YWithXInterval
    extends java.lang.Object
    implements java.io.Serializable
    A y-value plus the bounds for the related x-interval. This curious combination exists as an implementation detail, to fit into the structure of the ComparableObjectSeries class. It would have been possible to simply reuse the YInterval class by assuming that the y-interval in fact represents the x-interval, however I decided it was better to duplicate some code in order to document the real intent.
    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private double xHigh
      The upper bound of the x-interval.
      private double xLow
      The lower bound of the x-interval.
      private double y
      The y-value.
    • Constructor Summary

      Constructors 
      Constructor Description
      YWithXInterval​(double y, double xLow, double xHigh)
      Creates a new instance of YWithXInterval.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object obj)
      Tests this instance for equality with an arbitrary object.
      double getXHigh()
      Returns the upper bound of the x-interval.
      double getXLow()
      Returns the lower bound of the x-interval.
      double getY()
      Returns the y-value.
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • y

        private double y
        The y-value.
      • xLow

        private double xLow
        The lower bound of the x-interval.
      • xHigh

        private double xHigh
        The upper bound of the x-interval.
    • Constructor Detail

      • YWithXInterval

        public YWithXInterval​(double y,
                              double xLow,
                              double xHigh)
        Creates a new instance of YWithXInterval.
        Parameters:
        y - the y-value.
        xLow - the lower bound of the x-interval.
        xHigh - the upper bound of the x-interval.
    • Method Detail

      • getY

        public double getY()
        Returns the y-value.
        Returns:
        The y-value.
      • getXLow

        public double getXLow()
        Returns the lower bound of the x-interval.
        Returns:
        The lower bound of the x-interval.
      • getXHigh

        public double getXHigh()
        Returns the upper bound of the x-interval.
        Returns:
        The upper bound of the x-interval.
      • equals

        public boolean equals​(java.lang.Object obj)
        Tests this instance for equality with an arbitrary object.
        Overrides:
        equals in class java.lang.Object
        Parameters:
        obj - the object (null permitted).
        Returns:
        A boolean.