Record Class Indicators.SuperTrend
java.lang.Object
java.lang.Record
com.quantfinlib.indicators.Indicators.SuperTrend
- Enclosing class:
Indicators
direction: +1 = uptrend (value is support), -1 = downtrend (value is resistance).
-
Constructor Summary
ConstructorsConstructorDescriptionSuperTrend(double[] value, int[] direction) Creates an instance of aSuperTrendrecord class. -
Method Summary
Modifier and TypeMethodDescriptionint[]Returns the value of thedirectionrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.double[]value()Returns the value of thevaluerecord component.
-
Constructor Details
-
SuperTrend
public SuperTrend(double[] value, int[] direction) Creates an instance of aSuperTrendrecord class.- Parameters:
value- the value for thevaluerecord componentdirection- the value for thedirectionrecord 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). -
value
public double[] value()Returns the value of thevaluerecord component.- Returns:
- the value of the
valuerecord component
-
direction
public int[] direction()Returns the value of thedirectionrecord component.- Returns:
- the value of the
directionrecord component
-