Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
CityDoctor
CityDoctor2
Commits
bc6e1817
Commit
bc6e1817
authored
May 20, 2025
by
Riegel
Browse files
Docs: Update javadoc
parent
3358f91e
Pipeline
#11124
passed with stage
in 1 minute and 19 seconds
Changes
3
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/check/Check.java
View file @
bc6e1817
...
@@ -103,22 +103,21 @@ public abstract non-sealed class Check implements CheckableVisitor {
...
@@ -103,22 +103,21 @@ public abstract non-sealed class Check implements CheckableVisitor {
*
*
* @return true if it validates, false otherwise
* @return true if it validates, false otherwise
*/
*/
@Override
public
boolean
isValidator
()
{
public
boolean
isValidator
()
{
return
true
;
return
true
;
}
}
/**
/**
* Checks whether the check can be executed on this checkable, meaning the
* Checks whether this Check can execute on the Checkable, meaning the Checkable contains no error from
* checkable or its content can not have any error of any check dependent on
* this Check's dependencies and is applicable to this Check. <br/>
* this check. <br>
* If the check cannot be executed due to not fulfilling the dependencies a CheckResult will be created with the
* If the check cannot be executed a CheckResult will be created with the
* ResultStatus = DEPENDENCIES_NOT_MET.
* ResultStatus = DEPENDENCIES_NOT_MET.
*
*
* @param c the checkable
* @param c the checkable
* @param crc container for all check results
* @return true if the check can be executed, false otherwise
* @return true if the check can be executed, false if the checkable itself or
* one of its containing checkables have an error.
*/
*/
@Override
public
boolean
canExecute
(
Checkable
c
)
{
public
boolean
canExecute
(
Checkable
c
)
{
// ignore objects where this check doesn't apply to
// ignore objects where this check doesn't apply to
if
(!
canBeApplied
(
c
))
{
if
(!
canBeApplied
(
c
))
{
...
...
CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/check/CheckableUtilsVisitor.java
View file @
bc6e1817
...
@@ -40,16 +40,22 @@ import de.hft.stuttgart.citydoctor2.datastructure.WaterObject;
...
@@ -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
* This class serves as the base for CheckableVisitors which fulfill utility functions, like e.g. collecting all
* implementation of utility functions like e.g. collecting the sub-CityObjects in a Feature.
* sub-CityObjects in the datastructure of a CityObject.
*
* </p>
*
* Visitors extending from this class will not change the validated-flag of the visited Checkables.
* @author Matthias Betz
*
*
*/
*/
public
abstract
non
-
sealed
class
CheckableUtilsVisitor
implements
CheckableVisitor
{
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
)
{
public
boolean
canExecute
(
Checkable
c
)
{
return
true
;
return
true
;
}
}
...
...
CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/check/CheckableVisitor.java
View file @
bc6e1817
...
@@ -22,6 +22,9 @@ import de.hft.stuttgart.citydoctor2.datastructure.WaterObject;
...
@@ -22,6 +22,9 @@ import de.hft.stuttgart.citydoctor2.datastructure.WaterObject;
public
sealed
interface
CheckableVisitor
permits
Check
,
CheckableUtilsVisitor
{
public
sealed
interface
CheckableVisitor
permits
Check
,
CheckableUtilsVisitor
{
/**
* Returns whether a Checkable should be flagged as validated after accepting this Visitor.
*/
boolean
isValidator
();
boolean
isValidator
();
boolean
canExecute
(
Checkable
c
);
boolean
canExecute
(
Checkable
c
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment