Record Class Indicators.Macd
java.lang.Object
java.lang.Record
com.quantfinlib.indicators.Indicators.Macd
- Enclosing class:
Indicators
public static record Indicators.Macd(double[] line, double[] signal, double[] histogram)
extends Record
-
Constructor Summary
ConstructorsConstructorDescriptionMacd(double[] line, double[] signal, double[] histogram) Creates an instance of aMacdrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.double[]Returns the value of thehistogramrecord component.double[]line()Returns the value of thelinerecord component.double[]signal()Returns the value of thesignalrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Macd
public Macd(double[] line, double[] signal, double[] histogram) Creates an instance of aMacdrecord class.- Parameters:
line- the value for thelinerecord componentsignal- the value for thesignalrecord componenthistogram- the value for thehistogramrecord component
-
-
Method Details
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
line
public double[] line()Returns the value of thelinerecord component.- Returns:
- the value of the
linerecord component
-
signal
public double[] signal()Returns the value of thesignalrecord component.- Returns:
- the value of the
signalrecord component
-
histogram
public double[] histogram()Returns the value of thehistogramrecord component.- Returns:
- the value of the
histogramrecord component
-