Class BacktestOutcomes

java.lang.Object
com.qtsurfer.api.sdk.internal.BacktestOutcomes

public final class BacktestOutcomes extends Object
Reads an execute-result response as one of the four answers a standalone read can get.

The status is normalized rather than switched on raw, so this classifies a run by exactly the rule the poll loop stops on — one vocabulary for "what does this status mean", not two that can drift apart.

That also makes the null-safety line up on its own. StatusNormalizer.normalize(java.lang.Object) maps a missing status to IN_PROGRESS, which is the one variant that tolerates a null state, so a body-less response cannot reach a terminal variant and trip its null check.

  • Method Details

    • of

      public static BacktestOutcome of(com.qtsurfer.api.client.model.BacktestJobResult response)
      Classify an execute-result response.
      Parameters:
      response - the api-client response, or null when the platform answered a known job without a body
      Returns:
      the answer the response describes