summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorliamfallon <liam.fallon@est.tech>2018-12-07 22:28:49 +0000
committerliamfallon <liam.fallon@est.tech>2018-12-08 11:45:20 +0000
commit92dd84cb28d341e9fff892adb4b616b8b795be91 (patch)
treed330e221c7c7b6970d8419067b97712fcef3735a /examples
parente6753352980648bac92aff9a7295639349ea1295 (diff)
Fix checkstyle issues
Some minor line length and formatting checkstyle warnings fixed. Change-Id: Ib92069bbdb444560083e6d0dbf5d16a3ab824d82 Issue-ID: POLICY-1074 Signed-off-by: liamfallon <liam.fallon@est.tech>
Diffstat (limited to 'examples')
-rw-r--r--examples/examples-adaptive/src/main/java/org/onap/policy/apex/examples/adaptive/model/java/AutoLearnPolicyDecideTaskSelectionLogic.java16
1 files changed, 8 insertions, 8 deletions
diff --git a/examples/examples-adaptive/src/main/java/org/onap/policy/apex/examples/adaptive/model/java/AutoLearnPolicyDecideTaskSelectionLogic.java b/examples/examples-adaptive/src/main/java/org/onap/policy/apex/examples/adaptive/model/java/AutoLearnPolicyDecideTaskSelectionLogic.java
index 32387d047..ef697b077 100644
--- a/examples/examples-adaptive/src/main/java/org/onap/policy/apex/examples/adaptive/model/java/AutoLearnPolicyDecideTaskSelectionLogic.java
+++ b/examples/examples-adaptive/src/main/java/org/onap/policy/apex/examples/adaptive/model/java/AutoLearnPolicyDecideTaskSelectionLogic.java
@@ -49,10 +49,10 @@ public class AutoLearnPolicyDecideTaskSelectionLogic {
public boolean getTask(final TaskSelectionExecutionContext executor) {
String idString = executor.subject.getId();
executor.logger.debug(idString);
-
+
String inFieldsString = executor.inFields.toString();
executor.logger.debug(inFieldsString);
-
+
final List<String> tasks = executor.subject.getTaskNames();
size = tasks.size();
@@ -144,22 +144,22 @@ public class AutoLearnPolicyDecideTaskSelectionLogic {
autoLearn.setAvDiffs(Arrays.asList(avdiffs));
autoLearn.setCounts(Arrays.asList(counts));
}
-
/**
- * Calculate the return value of the learning
+ * Calculate the return value of the learning.
+ *
* @param diff the difference
- * @param r the random value
+ * @param random the random value
* @param closestupi closest to i upwards
* @param closestdowni closest to i downwards
* @param closestup closest up value
* @param closestdown closest down value
* @return the return value
*/
- private int calculateReturnValue(final double diff, final int r, int closestupi, int closestdowni, double closestup,
- double closestdown) {
+ private int calculateReturnValue(final double diff, final int random, int closestupi, int closestdowni,
+ double closestup, double closestdown) {
if (closestupi == -1 || closestdowni == -1) {
- return r;
+ return random;
}
if (closestupi == closestdowni) {
return closestupi;