Class BlockedMobOrSpawnPointError<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.BlockedMobOrSpawnPointError<G,A,R>
-
- All Implemented Interfaces:
java.io.Serializable,CorrectableError
public class BlockedMobOrSpawnPointError<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>> extends SquareValidationError<G,A,R> implements CorrectableError
Validation error that's used when the BlockedMobOrSpawnPointChecker detected a possible error on the map.- See Also:
- Serialized Form
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcorrect(@NotNull java.awt.Component parentComponent)Try to correct this error.@NotNull java.util.Collection<G>getBlockers()Returns the blockinggame objects.@NotNull java.util.Collection<G>getMobsOrSpawnPoints()Returns the mob or spawn pointgame objects.@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
-
BlockedMobOrSpawnPointError
public BlockedMobOrSpawnPointError(@NotNull @NotNull MapSquare<G,A,R> mapSquare, @NotNull @NotNull java.util.Collection<G> blockers, @NotNull @NotNull java.util.Collection<G> mobsOrSpawnPoints)Creates a new instance.- Parameters:
mapSquare- the square on which the error occurredblockers- the blocking game objectsmobsOrSpawnPoints- mob or spawn game objects
-
-
Method Detail
-
getBlockers
@NotNull public @NotNull java.util.Collection<G> getBlockers()
Returns the blockinggame objects.- Returns:
- the blocking game objects
-
getMobsOrSpawnPoints
@NotNull public @NotNull java.util.Collection<G> getMobsOrSpawnPoints()
Returns the mob or spawn pointgame objects.- Returns:
- the mob or spawn point game objects
-
correct
public void correct(@NotNull @NotNull java.awt.Component parentComponent)Description copied from interface:CorrectableErrorTry to correct this error.- Specified by:
correctin interfaceCorrectableError- Parameters:
parentComponent- parent component to display a dialog upon in case this error needs to query information from the user for correction
-
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
-
-