Interface StrategyBacked

All Known Implementing Classes:
Conclusion, SubConclusion

public sealed interface StrategyBacked permits Conclusion, SubConclusion
Sealed interface for elements that receive support from exactly one Strategy. The symmetric counterpart to SupportLeaf: where SupportLeaf marks elements that provide support, this interface marks elements that receive it.

Only Conclusion and SubConclusion may implement this interface. Note that SubConclusion implements both — it is a SupportLeaf (it can support a strategy chain) and a StrategyBacked (it is itself supported by a strategy).

  • Method Summary

    Modifier and Type
    Method
    Description
    void
    addSupport(Strategy supporter)
    Registers supporter as the single strategy backing this element.
    Returns the strategy backing this element, if one has been registered.
  • Method Details

    • addSupport

      void addSupport(Strategy supporter)
      Registers supporter as the single strategy backing this element.
    • getSupport

      Optional<Strategy> getSupport()
      Returns the strategy backing this element, if one has been registered.