20 package net.sf.gridarta.model.validation;
22 import java.io.Serializable;
23 import java.util.Comparator;
30 import org.jetbrains.annotations.NotNull;
48 if (mapModel1 == mapModel2) {
55 final int minX1 =
getMinX(o1, minY1);
56 final int minX2 =
getMinX(o2, minY2);
62 return System.identityHashCode(mapModel1) - System.identityHashCode(mapModel2);
71 int result = Integer.MAX_VALUE;
73 final int y = mapSquare.getMapY();
78 for (
final G gameObject : validationError.getGameObjects()) {
80 assert mapSquare != null;
81 final int y = mapSquare.
getMapY();
97 int result = Integer.MAX_VALUE;
99 if (mapSquare.getMapY() == y) {
100 final int x = mapSquare.getMapX();
106 for (
final G gameObject : validationError.getGameObjects()) {
108 assert mapSquare != null;
109 if (mapSquare.
getMapY() == y) {
110 final int x = mapSquare.
getMapX();
int getMapX()
Returns the x coordinate on the map.
A Comparator that compares ValidationError instances for display ordering.
MapSquare< G, A, R > getMapSquare()
A MapModel reflects the data of a map.
This package contains the framework for validating maps.
int getMinX(@NotNull final ValidationError< G, A, R > validationError, final int y)
Returns the minimal x coordinate of a ValidationError.
Super class of all errors that could occur during map validation.
Base package of all Gridarta classes.
Reflects a game object (object on a map).
GameObjects are the objects based on Archetypes found on maps.
static final long serialVersionUID
The serial version UID.
int getMinY(@NotNull final ValidationError< G, A, R > validationError)
Returns the minimal y coordinate of a ValidationError.
int getMapY()
Returns the y coordinate on the map.
Interface for MapArchObjects.
int compare(@NotNull final ValidationError< G, A, R > o1, @NotNull final ValidationError< G, A, R > o2)