Interface AcceptanceCondition

All Known Implementing Classes:
AbstractAcceptanceCondition, Argument, ConjunctionAcceptanceCondition, ContradictionAcceptanceCondition, DisjunctionAcceptanceCondition, EquivalenceAcceptanceCondition, ExclusiveDisjunctionAcceptanceCondition, ImplicationAcceptanceCondition, NegationAcceptanceCondition, TautologyAcceptanceCondition

public interface AcceptanceCondition
An immutable representation of acceptance conditions for ADFs.

Mirrors the structure of org.tweetyproject.logics.pl.syntax.PlFormula.

Author:
Mathias Hofer
  • Field Details

  • Method Details

    • arguments

      default Stream<Argument> arguments()
      Returns:
      recursively computes all the arguments of this acceptance condition
    • getChildren

      Set<AcceptanceCondition> getChildren()
      Returns:
      an unmodifiable set of children
    • accept

      <U,​ D> U accept(Visitor<U,​D> visitor, D topDownData)
      Passes the topDownData to the right visit method and returns the result of the visit method, performs no modifications on them.

      This allows for type-safe traversal through the acceptance condition structure.

      Type Parameters:
      U - the bottom-up data
      D - the top-down data
      Parameters:
      visitor - the visitor
      topDownData - the data which is passed from the root of the acceptance condition to the leaf
      Returns:
      the result of the visit method
    • contains

      default boolean contains(Argument arg)
      Checks if the given argument is contained in this acceptance condition.

      Note that this relation is reflexive, hence each argument contains itself.

      Parameters:
      arg - some argument
      Returns:
      true if the argument is contained
    • builder

      Returns a left-associative builder.
      Parameters:
      acc - the base acceptance condition, e.g. an argument
      Returns:
      a builder