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
d06f29ab
Commit
d06f29ab
authored
Aug 13, 2024
by
Riegel
Browse files
Converted record back to class. Ref
#69
parent
9ba8a6ef
Changes
2
Show whitespace changes
Inline
Side-by-side
CityDoctorParent/CityDoctorValidation/src/main/java/de/hft/stuttgart/citydoctor2/check/Checker.java
View file @
d06f29ab
...
...
@@ -317,7 +317,7 @@ public class Checker {
if
(
excludeFilters
!=
null
)
{
for
(
Filter
f
:
excludeFilters
)
{
if
(
f
instanceof
TypeFilter
tf
)
{
FeatureType
type
=
tf
.
t
ype
();
FeatureType
type
=
tf
.
getT
ype
();
TopLevelFeatureType
tlft
=
mapToTopLevelFeatureType
(
type
);
if
(
tlft
==
null
)
{
continue
;
...
...
@@ -336,7 +336,7 @@ public class Checker {
}
else
{
for
(
Filter
f
:
includeFilters
)
{
if
(
f
instanceof
TypeFilter
tf
)
{
FeatureType
type
=
tf
.
t
ype
();
FeatureType
type
=
tf
.
getT
ype
();
TopLevelFeatureType
tlft
=
mapToTopLevelFeatureType
(
type
);
if
(
tlft
==
null
)
{
continue
;
...
...
CityDoctorParent/CityDoctorValidation/src/main/java/de/hft/stuttgart/citydoctor2/check/TypeFilter.java
View file @
d06f29ab
...
...
@@ -21,17 +21,28 @@ package de.hft.stuttgart.citydoctor2.check;
import
de.hft.stuttgart.citydoctor2.datastructure.CityObject
;
import
de.hft.stuttgart.citydoctor2.datastructure.FeatureType
;
/**
* Filters the feature type of features
*
* @author Matthias Betz
*/
public
record
TypeFilter
(
FeatureType
type
)
implements
Filter
{
public
class
TypeFilter
implements
Filter
{
private
final
FeatureType
type
;
public
TypeFilter
(
FeatureType
type
)
{
this
.
type
=
type
;
}
@Override
public
boolean
matches
(
CityObject
co
)
{
return
co
.
getFeatureType
()
==
type
;
}
public
FeatureType
getType
()
{
return
type
;
}
}
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