public class CustomTypeChecker<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>
Constructor and Description |
---|
CustomTypeChecker(ValidatorPreferences validatorPreferences)
Creates a new instance.
|
Modifier and Type | Method and Description |
---|---|
void |
addIgnore(int fromType,
int toType)
Adds an allowed type change.
|
void |
addIgnore(int fromType,
int toType,
int envType)
Adds an allowed type change.
|
void |
validateGameObject(G gameObject,
ErrorCollector<G,A,R> errorCollector)
Validates a game object.
|
getKey, isDefaultEnabled, isEnabled, setEnabled
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getKey, isDefaultEnabled, isEnabled, setEnabled
public CustomTypeChecker(@NotNull ValidatorPreferences validatorPreferences)
validatorPreferences
- the validator preferences to usepublic void validateGameObject(@NotNull G gameObject, @NotNull ErrorCollector<G,A,R> errorCollector)
validateGameObject
in interface GameObjectValidator<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>>
gameObject
- the game object to validateerrorCollector
- the error collector to report errors topublic void addIgnore(int fromType, int toType)
fromType
- the allowed source typetoType
- the allowed destination typepublic void addIgnore(int fromType, int toType, int envType)
fromType
- the allowed source typetoType
- the allowed destination typeenvType
- the type of the parent object