Interface SignalPrecondition.Builder

  • Method Details

    • value

      The producer's determination.

      A Boolean rather than an enum, against the Common Terms preference for enums on extensibility grounds. The question each precondition answers is closed — is the code reachable, is configuration required, must a user other than the attacker interact — and the only third state, "not determined", is already expressed by omitting this member, which the projection does whenever the stored value is not a bool. An enum would give two ways to say the same thing, while basis and missingInfo already qualify how firm the answer is.

      Parameters:
      value - The producer's determination.

      A Boolean rather than an enum, against the Common Terms preference for enums on extensibility grounds. The question each precondition answers is closed — is the code reachable, is configuration required, must a user other than the attacker interact — and the only third state, "not determined", is already expressed by omitting this member, which the projection does whenever the stored value is not a bool. An enum would give two ways to say the same thing, while basis and missingInfo already qualify how firm the answer is.

      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • basis

      Where the producer's determination came from.

      Parameters:
      basis - Where the producer's determination came from.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • basis

      Where the producer's determination came from.

      Parameters:
      basis - Where the producer's determination came from.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • reason

      The producer's explanation.

      Parameters:
      reason - The producer's explanation.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • missingInfo

      SignalPrecondition.Builder missingInfo(String missingInfo)

      What the producer could not determine, when anything was missing.

      Parameters:
      missingInfo - What the producer could not determine, when anything was missing.
      Returns:
      Returns a reference to this object so that method calls can be chained together.