20 package net.sf.gridarta.model.validation.checks;
22 import java.util.HashMap;
28 import org.jetbrains.annotations.NotNull;
40 private final Map<String, RangeEntry<G, A, R>>
entries =
new HashMap<>();
50 if (entries.containsKey(name)) {
55 entries.put(name, entry);
65 final String name = e.getKey();
67 entry.
validate(gameObject.getHead().getAttributeInt(name), gameObject, errorCollector);
This package contains the framework for validating maps.
An Exception indicating that an attribute check is invalid.
Base package of all Gridarta classes.
Reflects a game object (object on a map).
GameObjects are the objects based on Archetypes found on maps.
void validate(@NotNull final G gameObject, @NotNull final ErrorCollector< G, A, R > errorCollector)
Validate a game object.
Represents a range of attribute values.
Manages all checks for one game object type.
An interface for classes that collect errors.
void add(@NotNull final String name, @NotNull final String displayName, @NotNull final Range range)
Add an attribute to check.
void validate(final int value, @NotNull final G gameObject, @NotNull final ErrorCollector< G, A, R > errorCollector)
Validate an attribute value.
Interface for MapArchObjects.
final Map< String, RangeEntry< G, A, R > > entries
Maps attribute name to corresponding RangeEntry instance.