Commit d06f29ab authored by Riegel's avatar Riegel
Browse files

Converted record back to class. Ref #69

parent 9ba8a6ef
......@@ -317,7 +317,7 @@ public class Checker {
if (excludeFilters != null) {
for (Filter f : excludeFilters) {
if (f instanceof TypeFilter tf) {
FeatureType type = tf.type();
FeatureType type = tf.getType();
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.type();
FeatureType type = tf.getType();
TopLevelFeatureType tlft = mapToTopLevelFeatureType(type);
if (tlft == null) {
continue;
......
......@@ -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;
}
}
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