Commit bc6e1817 authored by Riegel's avatar Riegel
Browse files

Docs: Update javadoc

parent 3358f91e
Pipeline #11124 passed with stage
in 1 minute and 19 seconds
......@@ -103,22 +103,21 @@ public abstract non-sealed class Check implements CheckableVisitor {
*
* @return true if it validates, false otherwise
*/
@Override
public boolean isValidator() {
return true;
}
/**
* Checks whether the check can be executed on this checkable, meaning the
* checkable or its content can not have any error of any check dependent on
* this check. <br>
* If the check cannot be executed a CheckResult will be created with the
* Checks whether this Check can execute on the Checkable, meaning the Checkable contains no error from
* this Check's dependencies and is applicable to this Check. <br/>
* If the check cannot be executed due to not fulfilling the dependencies a CheckResult will be created with the
* ResultStatus = DEPENDENCIES_NOT_MET.
*
*
* @param c the checkable
* @param crc container for all check results
* @return true if the check can be executed, false if the checkable itself or
* one of its containing checkables have an error.
* @return true if the check can be executed, false otherwise
*/
@Override
public boolean canExecute(Checkable c) {
// ignore objects where this check doesn't apply to
if (!canBeApplied(c)) {
......
......@@ -40,16 +40,22 @@ import de.hft.stuttgart.citydoctor2.datastructure.WaterObject;
/**
*
* This class serves as a Parent for non-validating checks that want to use the CheckEngine's Visitor-pattern for the
* implementation of utility functions like e.g. collecting the sub-CityObjects in a Feature.
*
*
* @author Matthias Betz
* This class serves as the base for CheckableVisitors which fulfill utility functions, like e.g. collecting all
* sub-CityObjects in the datastructure of a CityObject.
* </p>
* Visitors extending from this class will not change the validated-flag of the visited Checkables.
*
*/
public abstract non-sealed class CheckableUtilsVisitor implements CheckableVisitor {
//Util Visitors have no dependencies
/**
* This function is used for checking of dependencies in {@link Check}. Since UtilsVisitors do not have
* dependencies this function will always return true.
*
* @param c a Checkable
* @return true
*/
@Override
public boolean canExecute(Checkable c) {
return true;
}
......
......@@ -22,6 +22,9 @@ import de.hft.stuttgart.citydoctor2.datastructure.WaterObject;
public sealed interface CheckableVisitor permits Check, CheckableUtilsVisitor {
/**
* Returns whether a Checkable should be flagged as validated after accepting this Visitor.
*/
boolean isValidator();
boolean canExecute(Checkable c);
......
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