Package net.sf.tweety.arg.adf.syntax.acc
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
PlFormula
.- Author:
- Mathias Hofer
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
AcceptanceCondition.Builder
-
Field Summary
Fields Modifier and Type Field Description static ContradictionAcceptanceCondition
CONTRADICTION
This constant is an alias forContradictionAcceptanceCondition.INSTANCE
, its only purpose is readability.static TautologyAcceptanceCondition
TAUTOLOGY
This 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.Builder
builder(AcceptanceCondition acc)
Returns a left-associative builder.default boolean
contains(Argument arg)
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)
-
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
-
-