Record Class BoundedEquityCurve

java.lang.Object
java.lang.Record
com.qtsurfer.api.sdk.BoundedEquityCurve

public record BoundedEquityCurve(List<EquityCurvePoint> points, int inputPointCount, boolean resampled) extends Record
Normalized bounded sweep-run curve independent of the generated response model.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
    Default maximum points requested by the high-level SDK method.
    static final int
    Absolute process-safety ceiling, sized for an authorised Elite/Enterprise request.
  • Constructor Summary

    Constructors
    Constructor
    Description
    BoundedEquityCurve(List<EquityCurvePoint> points, int inputPointCount, boolean resampled)
    Creates an instance of a BoundedEquityCurve record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    decode(com.qtsurfer.api.client.model.EquityCurveResult result, int maxResample)
    Decode a compact response into absolute points and verify the requested bound.
    final boolean
    Indicates whether some other object is "equal to" this one.
    final int
    Returns a hash code value for this object.
    int
    Returns the value of the inputPointCount record component.
    Returns the value of the points record component.
    boolean
    Returns the value of the resampled record component.
    final String
    Returns a string representation of this record class.
    static void
    validateMaxResample(int maxResample)
    Validate a caller-selected bounded resample count.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Field Details

    • DEFAULT_MAX_RESAMPLE

      public static final int DEFAULT_MAX_RESAMPLE
      Default maximum points requested by the high-level SDK method.
      See Also:
    • MAX_MAX_RESAMPLE

      public static final int MAX_MAX_RESAMPLE
      Absolute process-safety ceiling, sized for an authorised Elite/Enterprise request.
      See Also:
  • Constructor Details

    • BoundedEquityCurve

      public BoundedEquityCurve(List<EquityCurvePoint> points, int inputPointCount, boolean resampled)
      Creates an instance of a BoundedEquityCurve record class.
      Parameters:
      points - the value for the points record component
      inputPointCount - the value for the inputPointCount record component
      resampled - the value for the resampled record component
  • Method Details

    • decode

      public static BoundedEquityCurve decode(com.qtsurfer.api.client.model.EquityCurveResult result, int maxResample)
      Decode a compact response into absolute points and verify the requested bound.
      Parameters:
      result - generated result returned by the API
      maxResample - requested point ceiling
      Returns:
      immutable normalized curve
    • validateMaxResample

      public static void validateMaxResample(int maxResample)
      Validate a caller-selected bounded resample count.
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • points

      public List<EquityCurvePoint> points()
      Returns the value of the points record component.
      Returns:
      the value of the points record component
    • inputPointCount

      public int inputPointCount()
      Returns the value of the inputPointCount record component.
      Returns:
      the value of the inputPointCount record component
    • resampled

      public boolean resampled()
      Returns the value of the resampled record component.
      Returns:
      the value of the resampled record component