Commit d187ac0f authored by Luna Riegel's avatar Luna Riegel
Browse files

Refactor: Rename function

parent 5677924a
...@@ -353,7 +353,7 @@ public abstract non-sealed class Check implements CheckableVisitor { ...@@ -353,7 +353,7 @@ public abstract non-sealed class Check implements CheckableVisitor {
* *
* @param params the parameter map containing the parameters for the check in * @param params the parameter map containing the parameters for the check in
* String form. The key should be the same String provided by the * String form. The key should be the same String provided by the
* {@link Requirement#getDefaultParameter()} method * {@link Requirement#getDefaultParameters()} method
* @param config sometimes there are global parameters which can be used by * @param config sometimes there are global parameters which can be used by
* checks. Those are be stored in this container * checks. Those are be stored in this container
* @param cache reference to the cache of the CityModel * @param cache reference to the cache of the CityModel
......
...@@ -107,7 +107,7 @@ public class Requirement implements Serializable { ...@@ -107,7 +107,7 @@ public class Requirement implements Serializable {
return id; return id;
} }
public List<DefaultParameter> getDefaultParameter() { public List<DefaultParameter> getDefaultParameters() {
return parameters; return parameters;
} }
......
...@@ -659,7 +659,7 @@ public class Checker { ...@@ -659,7 +659,7 @@ public class Checker {
Map<String, String> map = parameterMap.computeIfAbsent(id, k -> new HashMap<>()); Map<String, String> map = parameterMap.computeIfAbsent(id, k -> new HashMap<>());
for (de.hft.stuttgart.citydoctor2.check.Requirement req : proto.checksRequirements()) { for (de.hft.stuttgart.citydoctor2.check.Requirement req : proto.checksRequirements()) {
if (proto.checksRequirements().contains(req)) { if (proto.checksRequirements().contains(req)) {
for (DefaultParameter param : req.getDefaultParameter()) { for (DefaultParameter param : req.getDefaultParameters()) {
map.computeIfAbsent(param.getName(), k -> param.getValue()); map.computeIfAbsent(param.getName(), k -> param.getValue());
} }
} }
......
...@@ -86,7 +86,7 @@ public class ValidationConfiguration implements Serializable { ...@@ -86,7 +86,7 @@ public class ValidationConfiguration implements Serializable {
for (Requirement req : c.checksRequirements()) { for (Requirement req : c.checksRequirements()) {
RequirementConfiguration reqConfig = new RequirementConfiguration(); RequirementConfiguration reqConfig = new RequirementConfiguration();
reqConfig.setEnabled(true); reqConfig.setEnabled(true);
for (DefaultParameter param : req.getDefaultParameter()) { for (DefaultParameter param : req.getDefaultParameters()) {
reqConfig.getParameters().put(param.getName(), param.getValue()); reqConfig.getParameters().put(param.getName(), param.getValue());
} }
config.requirements.put(req.getId(), reqConfig); config.requirements.put(req.getId(), reqConfig);
...@@ -173,7 +173,7 @@ public class ValidationConfiguration implements Serializable { ...@@ -173,7 +173,7 @@ public class ValidationConfiguration implements Serializable {
for (Entry<String, RequirementConfiguration> entry : requirements.entrySet()) { for (Entry<String, RequirementConfiguration> entry : requirements.entrySet()) {
Requirement req = availableRequirements.get(entry.getKey()); Requirement req = availableRequirements.get(entry.getKey());
if (req != null) { if (req != null) {
for (DefaultParameter param : req.getDefaultParameter()) { for (DefaultParameter param : req.getDefaultParameters()) {
RequirementConfiguration config = entry.getValue(); RequirementConfiguration config = entry.getValue();
config.getParameters().computeIfAbsent(param.getName(), k -> param.getValue()); config.getParameters().computeIfAbsent(param.getName(), k -> param.getValue());
} }
...@@ -183,7 +183,7 @@ public class ValidationConfiguration implements Serializable { ...@@ -183,7 +183,7 @@ public class ValidationConfiguration implements Serializable {
requirements.computeIfAbsent(req.getId(), id -> { requirements.computeIfAbsent(req.getId(), id -> {
RequirementConfiguration cConfig = new RequirementConfiguration(); RequirementConfiguration cConfig = new RequirementConfiguration();
cConfig.setEnabled(true); cConfig.setEnabled(true);
for (DefaultParameter param : req.getDefaultParameter()) { for (DefaultParameter param : req.getDefaultParameters()) {
cConfig.getParameters().put(param.getName(), param.getValue()); cConfig.getParameters().put(param.getName(), param.getValue());
} }
return cConfig; return cConfig;
......
...@@ -694,7 +694,7 @@ public class CheckDialog { ...@@ -694,7 +694,7 @@ public class CheckDialog {
treeCheck.setEnabled(enabled); treeCheck.setEnabled(enabled);
TreeItem<TreeRequirement> ti = new TreeItem<>(treeCheck); TreeItem<TreeRequirement> ti = new TreeItem<>(treeCheck);
view.getRoot().getChildren().add(ti); view.getRoot().getChildren().add(ti);
for (DefaultParameter dp : r.getDefaultParameter()) { for (DefaultParameter dp : r.getDefaultParameters()) {
TreeItem<TreeRequirement> dpTi = new TreeItem<>(new TreeRequirement(dp)); TreeItem<TreeRequirement> dpTi = new TreeItem<>(new TreeRequirement(dp));
ti.getChildren().add(dpTi); ti.getChildren().add(dpTi);
} }
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment