20 package net.sf.gridarta.model.validation.checks;
22 import java.util.Arrays;
23 import java.util.Collection;
24 import java.util.HashSet;
35 import org.jetbrains.annotations.NotNull;
41 public class SquareWithoutFloorChecker<G
extends GameObject<G, A, R>, A extends
MapArchObject<A>, R extends
Archetype<G, A, R>> extends
AbstractValidator<G, A, R> implements
SquareValidator<G, A, R> {
47 private final Collection<Integer>
typeNumbers =
new HashSet<>();
55 super(validatorPreferences);
56 this.typeNumbers.addAll(Arrays.asList(typeNumbers));
62 if (typeNumbers.contains(gameObject.getTypeNo())) {
This is the base class for validators.
This package contains the framework for validating maps.
A MapValidator that checks for squares without a floor.
Base package of all Gridarta classes.
Reflects a game object (object on a map).
Configuration parameters for Validators.
GameObjects are the objects based on Archetypes found on maps.
final Collection< Integer > typeNumbers
The object types to check.
void validateSquare(@NotNull final MapSquare< G, A, R > mapSquare, @NotNull final ErrorCollector< G, A, R > errorCollector)
Validate a map square.
final ValidatorPreferences validatorPreferences
The ValidatorPreferences to use.
An interface for classes that collect errors.
Interface for MapArchObjects.
SquareWithoutFloorChecker(@NotNull final ValidatorPreferences validatorPreferences, @NotNull final Integer... typeNumbers)
Create a new instance.
Interface for Square Validators.
A SquareValidator to assert that squares have a floor.