Package net.sf.tweety.arg.adf.transform
Interface SimpleTransform<R>
-
- Type Parameters:
R- the result of the transform operation
- All Superinterfaces:
Transform<R,R>
- All Known Implementing Classes:
FixPartialTransform,OmegaReductTransform,PlFormulaTransform
public interface SimpleTransform<R> extends Transform<R,R>
A convenience interface for simple transformation operations on the recursive structure of the acceptance conditions.- Author:
- Mathias Hofer
-
-
Method Summary
Modifier and Type Method Description default RtransformArgument(java.util.function.Consumer<R> consumer, Argument argument, int polarity)RtransformArgument(Argument argument)RtransformConjunction(java.util.Collection<R> subconditions)default RtransformConjunction(java.util.function.Consumer<R> consumer, java.util.Collection<R> subconditions, int polarity)This method is visited by theConjunctionAcceptanceConditionsof the acceptance condition on which we apply thisTransform.RtransformContradiction()default RtransformContradiction(java.util.function.Consumer<R> consumer, int polarity)This method is visited by theContradictionAcceptanceConditionsof the acceptance condition on which we apply thisTransform.RtransformDisjunction(java.util.Collection<R> subconditions)default RtransformDisjunction(java.util.function.Consumer<R> consumer, java.util.Collection<R> subconditions, int polarity)This method is visited by theDisjunctionAcceptanceConditionsof the acceptance condition on which we apply thisTransform.default RtransformEquivalence(java.util.function.Consumer<R> consumer, R left, R right, int polarity)This method is visited by theEquivalenceAcceptanceConditionsof the acceptance condition on which we apply thisTransform.RtransformEquivalence(R left, R right)default RtransformExclusiveDisjunction(java.util.function.Consumer<R> consumer, R left, R right, int polarity)This method is visited by theExclusiveDisjunctionAcceptanceConditionsof the acceptance condition on which we apply thisTransform.RtransformExclusiveDisjunction(R left, R right)default RtransformImplication(java.util.function.Consumer<R> consumer, R left, R right, int polarity)This method is visited by theImplicationAcceptanceConditionsof the acceptance condition on which we apply thisTransform.RtransformImplication(R left, R right)default RtransformNegation(java.util.function.Consumer<R> consumer, R sub, int polarity)This method is visited by theNegationAcceptanceConditionsof the acceptance condition on which we apply thisTransform.RtransformNegation(R sub)RtransformTautology()default RtransformTautology(java.util.function.Consumer<R> consumer, int polarity)This method is visited by theTautologyAcceptanceConditionsof the acceptance condition on which we apply thisTransform.
-
-
-
Method Detail
-
transformDisjunction
default R transformDisjunction(java.util.function.Consumer<R> consumer, java.util.Collection<R> subconditions, int polarity)
Description copied from interface:TransformThis method is visited by theDisjunctionAcceptanceConditionsof the acceptance condition on which we apply thisTransform.- Specified by:
transformDisjunctionin interfaceTransform<R,R>- Parameters:
consumer- the consumer of the computed return valuessubconditions- the subconditions of this disjunction, e.g. {a, b} if this = or(a,b)polarity- polarity < 0: negative global position of this disjunction, e.g. this -> a
polarity = 0: neutral global position of this disjunction, e.g. this <-> a
polarity > 0: positive global position of this disjunction, e.g. a -> this- Returns:
- the result which we want to return to the parent-formula of this disjunction
-
transformConjunction
default R transformConjunction(java.util.function.Consumer<R> consumer, java.util.Collection<R> subconditions, int polarity)
Description copied from interface:TransformThis method is visited by theConjunctionAcceptanceConditionsof the acceptance condition on which we apply thisTransform.- Specified by:
transformConjunctionin interfaceTransform<R,R>- Parameters:
consumer- the consumer of the computed return valuessubconditions- the subconditions of this conjunction, e.g. {a, b} if this = and(a,b)polarity- polarity < 0: negative global position of this conjunction, e.g. this -> a
polarity = 0: neutral global position of this conjunction, e.g. this <-> a
polarity > 0: positive global position of this conjunction, e.g. a -> this- Returns:
- the result which we want to return to the parent-formula of this conjunction
-
transformImplication
default R transformImplication(java.util.function.Consumer<R> consumer, R left, R right, int polarity)
Description copied from interface:TransformThis method is visited by theImplicationAcceptanceConditionsof the acceptance condition on which we apply thisTransform.- Specified by:
transformImplicationin interfaceTransform<R,R>- Parameters:
consumer- the consumer of the computed return valuesleft- the left part of the implicationright- the right part of the implicationpolarity- polarity < 0: negative global position of this implication, e.g. this -> a
polarity = 0: neutral global position of this implication, e.g. this <-> a
polarity > 0: positive global position of this implication, e.g. a -> this- Returns:
- the result which we want to return to the parent-formula of this implication
-
transformEquivalence
default R transformEquivalence(java.util.function.Consumer<R> consumer, R left, R right, int polarity)
Description copied from interface:TransformThis method is visited by theEquivalenceAcceptanceConditionsof the acceptance condition on which we apply thisTransform.- Specified by:
transformEquivalencein interfaceTransform<R,R>- Parameters:
consumer- the consumer of the computed return valuesleft- the left part of the equivalenceright- the right part of the equivalencepolarity- polarity < 0: negative global position of this equivalence, e.g. this -> a
polarity = 0: neutral global position of this equivalence, e.g. this <-> a
polarity > 0: positive global position of this equivalence, e.g. a -> this- Returns:
- the result which we want to return to the parent-formula of this equivalence
-
transformExclusiveDisjunction
default R transformExclusiveDisjunction(java.util.function.Consumer<R> consumer, R left, R right, int polarity)
Description copied from interface:TransformThis method is visited by theExclusiveDisjunctionAcceptanceConditionsof the acceptance condition on which we apply thisTransform.- Specified by:
transformExclusiveDisjunctionin interfaceTransform<R,R>- Parameters:
consumer- the consumer of the computed return valuesleft- the left part of the xorright- the right part of the xorpolarity- polarity < 0: negative global position of this xor, e.g. this -> a
polarity = 0: neutral global position of this xor, e.g. this <-> a
polarity > 0: positive global position of this xor, e.g. a -> this- Returns:
- the result which we want to return to the parent-formula of this xor
-
transformNegation
default R transformNegation(java.util.function.Consumer<R> consumer, R sub, int polarity)
Description copied from interface:TransformThis method is visited by theNegationAcceptanceConditionsof the acceptance condition on which we apply thisTransform.- Specified by:
transformNegationin interfaceTransform<R,R>- Parameters:
consumer- the consumer of the computed return valuessub- the subformula of this negation, i.e. this = neg(sub)polarity- polarity < 0: negative global position of this negation, e.g. this -> a
polarity = 0: neutral global position of this negation, e.g. this <-> a
polarity > 0: positive global position of this negation, e.g. a -> this- Returns:
- the result which we want to return to the parent-formula of this negation
-
transformArgument
default R transformArgument(java.util.function.Consumer<R> consumer, Argument argument, int polarity)
Description copied from interface:TransformThis method is visited by theArgumentsof the acceptance condition on which we apply thisTransform.- Specified by:
transformArgumentin interfaceTransform<R,R>- Parameters:
consumer- the consumer of the computed return valuesargument- the argument which calls this methodpolarity- polarity < 0: negative global position of this argument, e.g. this -> a
polarity = 0: neutral global position of this argument, e.g. this <-> a
polarity > 0: positive global position of this argument, e.g. a -> this- Returns:
- the result which we want to return to the parent-formula of this argument
-
transformContradiction
default R transformContradiction(java.util.function.Consumer<R> consumer, int polarity)
Description copied from interface:TransformThis method is visited by theContradictionAcceptanceConditionsof the acceptance condition on which we apply thisTransform.- Specified by:
transformContradictionin interfaceTransform<R,R>- Parameters:
consumer- the consumer of the computed return valuespolarity- polarity < 0: negative global position of this contradiction, e.g. this -> a
polarity = 0: neutral global position of this contradiction, e.g. this <-> a
polarity > 0: positive global position of this contradiction, e.g. a -> this- Returns:
- the result which we want to return to the parent-formula of this contradiction
-
transformTautology
default R transformTautology(java.util.function.Consumer<R> consumer, int polarity)
Description copied from interface:TransformThis method is visited by theTautologyAcceptanceConditionsof the acceptance condition on which we apply thisTransform.- Specified by:
transformTautologyin interfaceTransform<R,R>- Parameters:
consumer- the consumer of the computed return valuespolarity- polarity < 0: negative global position of this tautology, e.g. this -> a
polarity = 0: neutral global position of this tautology, e.g. this <-> a
polarity > 0: positive global position of this tautology, e.g. a -> this- Returns:
- the result which we want to return to the parent-formula of this tautology
-
transformContradiction
R transformContradiction()
-
transformTautology
R transformTautology()
-
-