 |
Gridarta Editor
|
Go to the documentation of this file.
20 package net.sf.gridarta.model.validation.checks;
22 import java.util.Arrays;
23 import java.util.Collection;
24 import java.util.HashSet;
34 import org.jetbrains.annotations.NotNull;
40 public class UnsetSlayingChecker<G
extends GameObject<G, A, R>, A extends
MapArchObject<A>, R extends
Archetype<G, A, R>> extends
AbstractValidator<G, A, R> implements
GameObjectValidator<G, A, R> {
46 private final Collection<Integer>
typeNumbers =
new HashSet<>();
62 this.typeNumbers.addAll(Arrays.asList(
typeNumbers));
76 final String slayingArchetype = gameObject.getArchetype().getAttributeString(
BaseObject.
SLAYING);
79 if (slayingArchetype.equals(slayingObject)) {
Base package of all Gridarta classes.
void validateGameObject(@NotNull final G gameObject, @NotNull final ErrorCollector< G, A, R > errorCollector)
Validates a game object.
Reflects a game object (object on a map).
void addAllowedValue(@NotNull final String value)
Adds a value which does not trigger a warning.
final ValidatorPreferences validatorPreferences
The ValidatorPreferences to use.
Configuration parameters for Validators.
GameObjects are the objects based on Archetypes found on maps.
final Collection< String > allowedValues
The values which do not trigger a warning.
Interface for MapArchObjects.
Validation error indicating a game object with a custom type.
An interface for classes that collect errors.
This is the base class for validators.
This package contains the framework for validating maps.
String SLAYING
The name of the "slaying" attribute.
Checks that a game object does not set a custom type.
UnsetSlayingChecker(@NotNull final ValidatorPreferences validatorPreferences, @NotNull final Integer... typeNumbers)
Creates a new instance.
Interface for GameObject Validators.
final Collection< Integer > typeNumbers
The object types to check.