Class AttributeRangeError<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>>
- java.lang.Object
-
- net.sf.gridarta.model.validation.errors.ValidationError<G,A,R>
-
- net.sf.gridarta.model.validation.errors.MapValidationError<G,A,R>
-
- net.sf.gridarta.model.validation.errors.SquareValidationError<G,A,R>
-
- net.sf.gridarta.model.validation.errors.GameObjectValidationError<G,A,R>
-
- net.sf.gridarta.model.validation.errors.AttributeRangeError<G,A,R>
-
- All Implemented Interfaces:
java.io.Serializable
public class AttributeRangeError<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>> extends GameObjectValidationError<G,A,R>
Indicate an attribute value that is out of range.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description AttributeRangeError(G gameObject, @NotNull java.lang.String attributeName, @NotNull java.lang.String curValue, @NotNull java.lang.String minValue, @NotNull java.lang.String maxValue)Creates a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description @Nullable java.lang.StringgetParameter(int id)Returns a parameter string to be used in the error message.-
Methods inherited from class net.sf.gridarta.model.validation.errors.ValidationError
addGameObject, addMapSquare, getGameObjects, getMapModel, getMapSquares, getMessage, toString
-
-
-
-
Constructor Detail
-
AttributeRangeError
public AttributeRangeError(@NotNull G gameObject, @NotNull @NotNull java.lang.String attributeName, @NotNull @NotNull java.lang.String curValue, @NotNull @NotNull java.lang.String minValue, @NotNull @NotNull java.lang.String maxValue)Creates a new instance.- Parameters:
gameObject- the game object having an out of range valueattributeName- the suspicious attribute namecurValue- the current (incorrect) attribute valueminValue- the minimal allowed attribute valuemaxValue- the maximal allowed attribute value
-
-
Method Detail
-
getParameter
@Nullable public @Nullable java.lang.String getParameter(int id)
Description copied from class:ValidationErrorReturns a parameter string to be used in the error message. It can be accessed with {4+id}.- Specified by:
getParameterin classValidationError<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>>- Parameters:
id- the error id- Returns:
- the error string
-
-