Interface AcceptanceCondition
- 
- All Known Implementing Classes:
 AbstractAcceptanceCondition,Argument,ConjunctionAcceptanceCondition,ContradictionAcceptanceCondition,DisjunctionAcceptanceCondition,EquivalenceAcceptanceCondition,ExclusiveDisjunctionAcceptanceCondition,ImplicationAcceptanceCondition,NegationAcceptanceCondition,TautologyAcceptanceCondition
public interface AcceptanceConditionAn immutable representation of acceptance conditions for ADFs.Mirrors the structure of org.tweetyproject.logics.pl.syntax.PlFormula.
- Author:
 - Mathias Hofer
 
 
- 
- 
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classAcceptanceCondition.Builder 
- 
Field Summary
Fields Modifier and Type Field Description static ContradictionAcceptanceConditionCONTRADICTIONThis constant is an alias forContradictionAcceptanceCondition.INSTANCE, its only purpose is readability.static TautologyAcceptanceConditionTAUTOLOGYThis constant is an alias forTautologyAcceptanceCondition.INSTANCE, its only purpose is readability. 
- 
Method Summary
Modifier and Type Method Description <U,D>
Uaccept(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.default java.util.stream.Stream<Argument>arguments()static AcceptanceCondition.Builderbuilder(AcceptanceCondition acc)Returns a left-associative builder.default booleancontains(Argument arg)Checks if the given argument is contained in this acceptance condition.java.util.Set<AcceptanceCondition>getChildren() 
 - 
 
- 
- 
Field Detail
- 
CONTRADICTION
static final ContradictionAcceptanceCondition CONTRADICTION
This constant is an alias forContradictionAcceptanceCondition.INSTANCE, its only purpose is readability.It is guaranteed that there is only one instance of the logical constant, therefore it is safe to perform == checks.
 
- 
TAUTOLOGY
static final TautologyAcceptanceCondition TAUTOLOGY
This constant is an alias forTautologyAcceptanceCondition.INSTANCE, its only purpose is readability.It is guaranteed that there is only one instance of the logical constant, therefore it is safe to perform == checks.
 
 - 
 
- 
Method Detail
- 
arguments
default java.util.stream.Stream<Argument> arguments()
- Returns:
 - recursively computes all the arguments of this acceptance condition
 
 
- 
getChildren
java.util.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 dataD- the top-down data- Parameters:
 visitor- the visitortopDownData- 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
static AcceptanceCondition.Builder builder(AcceptanceCondition acc)
Returns a left-associative builder.- Parameters:
 acc- the base acceptance condition, e.g. an argument- Returns:
 - a builder
 
 
 - 
 
 -