Class OHLC

  • All Implemented Interfaces:
    java.io.Serializable

    public class OHLC
    extends java.lang.Object
    implements java.io.Serializable
    A data record containing open-high-low-close data (immutable). This class is used internally by the OHLCItem class.
    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private double close
      The close value.
      private double high
      The high value.
      private double low
      The low value.
      private double open
      The open value.
    • Constructor Summary

      Constructors 
      Constructor Description
      OHLC​(double open, double high, double low, double close)
      Creates a new instance of OHLC.
    • 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 getClose()
      Returns the close value.
      double getHigh()
      Returns the high value.
      double getLow()
      Returns the low value.
      double getOpen()
      Returns the open value.
      int hashCode()
      Returns a hash code for this instance.
      • Methods inherited from class java.lang.Object

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

      • open

        private double open
        The open value.
      • close

        private double close
        The close value.
      • high

        private double high
        The high value.
      • low

        private double low
        The low value.
    • Constructor Detail

      • OHLC

        public OHLC​(double open,
                    double high,
                    double low,
                    double close)
        Creates a new instance of OHLC.
        Parameters:
        open - the open value.
        close - the close value.
        high - the high value.
        low - the low value.
    • Method Detail

      • getOpen

        public double getOpen()
        Returns the open value.
        Returns:
        The open value.
      • getClose

        public double getClose()
        Returns the close value.
        Returns:
        The close value.
      • getHigh

        public double getHigh()
        Returns the high value.
        Returns:
        The high value.
      • getLow

        public double getLow()
        Returns the low value.
        Returns:
        The low value.
      • 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.
      • hashCode

        public int hashCode()
        Returns a hash code for this instance.
        Overrides:
        hashCode in class java.lang.Object
        Returns:
        A hash code.