Skip to content

Commit 0232abc

Browse files
author
“jklein94”
committed
Added missing javadoc
1 parent bb94fa9 commit 0232abc

130 files changed

Lines changed: 5657 additions & 2448 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

org-tweetyproject-agents-dialogues/src/main/java/org/tweetyproject/agents/dialogues/examples/GroundedTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,7 @@ public String call() throws Exception {
350350
/**
351351
* Grounded test method
352352
* @param args the args
353-
* @throws ProtocolTerminatedException
353+
* @throws ProtocolTerminatedException error
354354
*/
355355
public static void main(String[] args) throws ProtocolTerminatedException {
356356
// set logging level to "TRACE" to get detailed descriptions

org-tweetyproject-agents-dialogues/src/main/java/org/tweetyproject/agents/dialogues/examples/LotteryDialogueTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ public String call() throws Exception {
191191
* LotteryDialogue test main method
192192
*
193193
* @param args the args
194-
* @throws ProtocolTerminatedException
194+
* @throws ProtocolTerminatedException error
195195
*/
196196
public static void main(String[] args) throws ProtocolTerminatedException {
197197
LotteryDialogueTest.attackProbability = 0.3;

org-tweetyproject-arg-adf/src/main/java/org/tweetyproject/arg/adf/io/KppADFFormatWriter.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,11 @@
4444
*/
4545
public class KppADFFormatWriter {
4646

47+
/**
48+
* Write acceptanceConditions
49+
* @param acceptanceConditions condition
50+
* @return written string
51+
*/
4752
public static String write(Map<Argument,AcceptanceCondition> acceptanceConditions) {
4853
StringBuilder s = new StringBuilder();
4954
Map<Argument, String> nameMap = new HashMap<>();
@@ -116,7 +121,7 @@ public static void writeTo(AbstractDialecticalFramework adf, OutputStream out) {
116121
}
117122

118123
/**
119-
*
124+
* Write to file
120125
* @param adf adf
121126
* @param file file
122127
* @throws FileNotFoundException File Not Found Exception

org-tweetyproject-arg-adf/src/main/java/org/tweetyproject/arg/adf/reasoner/NaiveReasoner.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,17 +25,16 @@
2525
import org.tweetyproject.arg.adf.semantics.interpretation.Interpretation;
2626
import org.tweetyproject.arg.adf.syntax.adf.AbstractDialecticalFramework;
2727

28-
@Deprecated( forRemoval = true, since = "1.19" )
2928
/**
30-
*
29+
* NaiveReasoner class
3130
* @author Mattias Thimm
3231
*
3332
*/
34-
33+
@Deprecated( forRemoval = true, since = "1.19" )
3534
public class NaiveReasoner extends AbstractDialecticalFrameworkReasoner {
3635

3736
/**
38-
*
37+
*Constructor
3938
* @param solver
4039
* the underlying sat solver
4140
*/

org-tweetyproject-arg-adf/src/main/java/org/tweetyproject/arg/adf/semantics/interpretation/Interpretation.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,13 @@ static Interpretation fromMap(Map<Argument, Boolean> assignment) {
7676
}
7777
return new SetInterpretation(satisfied, unsatisfied, undecided);
7878
}
79+
7980
/**
8081
* Interpretation fromSets
82+
* @param satisfied satisfied
83+
* @param unsatisfied unsatisfied
84+
* @param adf adf
85+
* @return Interpretation fromSets
8186
*/
8287
static Interpretation fromSets(Set<Argument> satisfied, Set<Argument> unsatisfied, AbstractDialecticalFramework adf) {
8388
Set<Argument> undecided = new HashSet<>();

org-tweetyproject-arg-adf/src/main/java/org/tweetyproject/arg/adf/semantics/link/SimpleLink.java

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,22 +48,45 @@ public SimpleLink(Argument from, Argument to, LinkType type) {
4848
this.to = Objects.requireNonNull(to);
4949
this.type = Objects.requireNonNull(type);
5050
}
51-
51+
/**
52+
* Constructs a new {@code SimpleLink} with the specified source and target arguments.
53+
* The link is of type {@code LinkType.DEPENDENT}.
54+
*
55+
* @param from The source argument from which the link originates.
56+
* @param to The target argument to which the link points.
57+
* @throws NullPointerException if either {@code from} or {@code to} is {@code null}.
58+
*/
5259
public SimpleLink(Argument from, Argument to) {
5360
super(from, to);
5461
this.from = Objects.requireNonNull(from);
5562
this.to = Objects.requireNonNull(to);
5663
this.type = LinkType.DEPENDENT;
5764
}
5865

66+
/**
67+
* Returns the source argument from which the link originates.
68+
*
69+
* @return The source argument.
70+
*/
5971
public Argument getFrom() {
6072
return from;
6173
}
6274

75+
/**
76+
* Returns the target argument to which the link points.
77+
*
78+
* @return The target argument.
79+
*/
6380
public Argument getTo() {
6481
return to;
6582
}
6683

84+
/**
85+
* Returns the type of the link, indicating the nature of the connection
86+
* between the source and target arguments.
87+
*
88+
* @return The link type.
89+
*/
6790
public LinkType getType() {
6891
return type;
6992
}

org-tweetyproject-arg-adf/src/main/java/org/tweetyproject/arg/adf/syntax/adf/AbstractDialecticalFramework.java

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -277,10 +277,25 @@ default boolean bipolar() {
277277
*/
278278
interface Builder {
279279

280+
/**
281+
*
282+
* Return lazy builder instance
283+
* @param linkStrategy linkStrategy
284+
* @return lazy builder instance
285+
*/
280286
Builder lazy(LinkStrategy linkStrategy);
281287

288+
/**
289+
* provided builder
290+
* @return Builder instance
291+
*/
282292
Builder provided();
283293

294+
/**
295+
* Eager builder
296+
* @param linkStrategy linkStrategy
297+
* @return builder instance
298+
*/
284299
Builder eager(LinkStrategy linkStrategy);
285300

286301
/**
@@ -300,6 +315,12 @@ interface Builder {
300315
*/
301316
Builder add(Link link);
302317

318+
/**
319+
* Removes arg
320+
*
321+
* @param arg arg to remove
322+
* @return this Builder instance
323+
*/
303324
Builder remove(Argument arg);
304325

305326
/**

org-tweetyproject-arg-adf/src/main/java/org/tweetyproject/arg/adf/transform/AbstractCollector.java

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,9 +77,19 @@ public R transform(AcceptanceCondition acc) {
7777
return finish(bottomUpData, collection);
7878
}
7979

80-
protected U transform(AcceptanceCondition acc, Consumer<D> userObject) {
81-
return acc.accept(visitor, new TopDownData<D>(topLevelPolarity, userObject));
82-
}
80+
/**
81+
* Transforms the given acceptance condition using a visitor pattern and additional user-provided data.
82+
*
83+
*
84+
* @param acc The {@code AcceptanceCondition} to be transformed.
85+
* @param userObject A {@code Consumer<D>} that provides additional data or operations
86+
* to be used during the transformation process.
87+
* @return The result of the transformation, which is an instance of type {@code U}.
88+
*/
89+
protected U transform(AcceptanceCondition acc, Consumer<D> userObject) {
90+
return acc.accept(visitor, new TopDownData<D>(topLevelPolarity, userObject));
91+
}
92+
8393

8494
/*
8595
* (non-Javadoc)

org-tweetyproject-arg-adf/src/main/java/org/tweetyproject/arg/adf/transform/AbstractTransformer.java

Lines changed: 104 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -57,10 +57,21 @@ public R transform(AcceptanceCondition acc) {
5757
return finish(bottomUpData, userObject);
5858
}
5959

60+
/**
61+
* Transform
62+
* @param acc condition
63+
* @param userObject object
64+
* @return transformed
65+
*/
6066
protected U transform(AcceptanceCondition acc, D userObject) {
6167
return acc.accept(visitor, new TopDownData<D>(topLevelPolarity(), userObject));
6268
}
6369

70+
/**
71+
*
72+
* Return topLevelPolarity
73+
* @return topLevelPolarity
74+
*/
6475
protected int topLevelPolarity() {
6576
return 1;
6677
}
@@ -72,25 +83,108 @@ protected int topLevelPolarity() {
7283
*/
7384
protected abstract D initialize();
7485

75-
protected abstract R finish(U bottomUpData, D topDownData);
86+
/**
87+
* Finalizes the transformation process and returns the result.
88+
*
89+
* @param bottomUpData The data accumulated during the bottom-up traversal.
90+
* @param topDownData The data provided during the top-down traversal.
91+
* @return The final result of the transformation process, of type {@code R}.
92+
*/
93+
protected abstract R finish(U bottomUpData, D topDownData);
94+
95+
/**
96+
* Transforms a disjunction of two sub-expressions.
97+
*
98+
* @param left The transformed result of the left sub-expression.
99+
* @param right The transformed result of the right sub-expression.
100+
* @param topDownData The data provided during the top-down traversal.
101+
* @param polarity The polarity (e.g., positive or negative) to guide the transformation.
102+
* @return The result of transforming the disjunction, of type {@code U}.
103+
*/
104+
protected abstract U transformDisjunction(U left, U right, D topDownData, int polarity);
76105

77-
protected abstract U transformDisjunction(U left, U right, D topDownData, int polarity);
106+
/**
107+
* Transforms a conjunction of two sub-expressions.
108+
*
109+
* @param left The transformed result of the left sub-expression.
110+
* @param right The transformed result of the right sub-expression.
111+
* @param topDownData The data provided during the top-down traversal.
112+
* @param polarity The polarity (e.g., positive or negative) to guide the transformation.
113+
* @return The result of transforming the conjunction, of type {@code U}.
114+
*/
115+
protected abstract U transformConjunction(U left, U right, D topDownData, int polarity);
78116

79-
protected abstract U transformConjunction(U left, U right, D topDownData, int polarity);
117+
/**
118+
* Transforms an implication between two sub-expressions.
119+
*
120+
* @param left The transformed result of the left sub-expression.
121+
* @param right The transformed result of the right sub-expression.
122+
* @param topDownData The data provided during the top-down traversal.
123+
* @param polarity The polarity (e.g., positive or negative) to guide the transformation.
124+
* @return The result of transforming the implication, of type {@code U}.
125+
*/
126+
protected abstract U transformImplication(U left, U right, D topDownData, int polarity);
80127

81-
protected abstract U transformImplication(U left, U right, D topDownData, int polarity);
128+
/**
129+
* Transforms an equivalence between two sub-expressions.
130+
*
131+
* @param left The transformed result of the left sub-expression.
132+
* @param right The transformed result of the right sub-expression.
133+
* @param topDownData The data provided during the top-down traversal.
134+
* @param polarity The polarity (e.g., positive or negative) to guide the transformation.
135+
* @return The result of transforming the equivalence, of type {@code U}.
136+
*/
137+
protected abstract U transformEquivalence(U left, U right, D topDownData, int polarity);
82138

83-
protected abstract U transformEquivalence(U left, U right, D topDownData, int polarity);
139+
/**
140+
* Transforms an exclusive disjunction (XOR) between two sub-expressions.
141+
*
142+
* @param left The transformed result of the left sub-expression.
143+
* @param right The transformed result of the right sub-expression.
144+
* @param topDownData The data provided during the top-down traversal.
145+
* @param polarity The polarity (e.g., positive or negative) to guide the transformation.
146+
* @return The result of transforming the exclusive disjunction, of type {@code U}.
147+
*/
148+
protected abstract U transformExclusiveDisjunction(U left, U right, D topDownData, int polarity);
84149

85-
protected abstract U transformExclusiveDisjunction(U left, U right, D topDownData, int polarity);
150+
/**
151+
* Transforms a negation of a sub-expression.
152+
*
153+
* @param child The transformed result of the sub-expression being negated.
154+
* @param topDownData The data provided during the top-down traversal.
155+
* @param polarity The polarity (e.g., positive or negative) to guide the transformation.
156+
* @return The result of transforming the negation, of type {@code U}.
157+
*/
158+
protected abstract U transformNegation(U child, D topDownData, int polarity);
86159

87-
protected abstract U transformNegation(U child, D topDownData, int polarity);
160+
/**
161+
* Transforms an argument within the logical structure.
162+
*
163+
* @param argument The argument to be transformed.
164+
* @param topDownData The data provided during the top-down traversal.
165+
* @param polarity The polarity (e.g., positive or negative) to guide the transformation.
166+
* @return The result of transforming the argument, of type {@code U}.
167+
*/
168+
protected abstract U transformArgument(Argument argument, D topDownData, int polarity);
88169

89-
protected abstract U transformArgument(Argument argument, D topDownData, int polarity);
170+
/**
171+
* Transforms a contradiction in the logical structure.
172+
*
173+
* @param topDownData The data provided during the top-down traversal.
174+
* @param polarity The polarity (e.g., positive or negative) to guide the transformation.
175+
* @return The result of transforming the contradiction, of type {@code U}.
176+
*/
177+
protected abstract U transformContradiction(D topDownData, int polarity);
90178

91-
protected abstract U transformContradiction(D topDownData, int polarity);
179+
/**
180+
* Transforms a tautology in the logical structure.
181+
*
182+
* @param topDownData The data provided during the top-down traversal.
183+
* @param polarity The polarity (e.g., positive or negative) to guide the transformation.
184+
* @return The result of transforming the tautology, of type {@code U}.
185+
*/
186+
protected abstract U transformTautology(D topDownData, int polarity);
92187

93-
protected abstract U transformTautology(D topDownData, int polarity);
94188

95189
/**
96190
* We encapsulate the Visitor in a separate private class s.t. we do not

0 commit comments

Comments
 (0)