Class Strategy

java.lang.Object
ca.mcscert.jpipe.model.elements.Strategy
All Implemented Interfaces:
CommonElement, ElementView, JustificationElement

public final class Strategy extends Object implements CommonElement
A reasoning strategy connecting evidence to a conclusion.
  • Constructor Details

  • Method Details

    • id

      public String id()
      Description copied from interface: ElementView
      Unique identifier of this element within its containing model.
      Specified by:
      id in interface ElementView
    • label

      public String label()
      Description copied from interface: ElementView
      Human-readable display label.
      Specified by:
      label in interface ElementView
    • kind

      public String kind()
      Description copied from interface: JustificationElement
      The kebab-case name of this element's kind, as used in user-facing output: conclusion, sub-conclusion, strategy, evidence, abstract-support.
      Specified by:
      kind in interface JustificationElement
      Returns:
      the kind name of this element.
    • addSupport

      public void addSupport(SupportLeaf supporter)
      Adds supporter to this strategy. A strategy can never legitimately be supported twice by the same element id, so the call is idempotent by id: if a supporter with the same id is already present, nothing is added.
    • getSupports

      public List<SupportLeaf> getSupports()
    • replaceSupport

      public void replaceSupport(SupportLeaf oldSupport, SupportLeaf newSupport)
      Replaces the supporter sharing oldSupport's id with newSupport. Matching is by id rather than object identity so that an AbstractSupport placeholder can be swapped for the concrete element that overrides it (both share the same qualified id but are different objects and types).
    • toString

      public String toString()
      Overrides:
      toString in class Object