Gridarta Editor
Package net.sf.gridarta.model.validation

This package contains the framework for validating maps. More...

Packages

package  checks
 This package contains the checks for validating maps.
 
package  errors
 

Classes

class  AbstractValidator
 This is the base class for validators. More...
 
class  AbstractValidatorTest
 Test for AbstractValidator. More...
 
class  DefaultErrorCollector
 Simple error collector that just collects the error in a collection for later retrieval through iteration. More...
 
class  DefaultValidatorPreferences
 Default ValidatorPreferences implementations. More...
 
class  DelegatingMapValidator
 A Map Validator that delegates to other MapValidators. More...
 
interface  ErrorCollector
 An interface for classes that collect errors. More...
 
interface  GameObjectValidator
 Interface for GameObject Validators. More...
 
interface  MapValidator
 Interface for Map Validators. More...
 
class  NoSuchValidatorException
 Exception thrown if a map validator cannot be created. More...
 
interface  SquareValidator
 Interface for Square Validators. More...
 
class  TestValidatorPreferences
 ValidatorPreferences implementation for regression tests. More...
 
class  ValidationErrorComparator
 A Comparator that compares ValidationError instances for display ordering. More...
 
class  ValidationUtils
 Utility class for helper functions needed be regression tests. More...
 
interface  Validator
 Super-interface for validators. More...
 
interface  ValidatorPreferences
 Configuration parameters for Validators. More...
 

Detailed Description

This package contains the framework for validating maps.

Design Notes

Notes on not using a Mirror API

Although it would have been possible to create a Mirror API I have decided to directly hand out the original API to the map validation.

Pro Mirror API / Contra Original API

  • Keep the validation from (accidental) manipulation.

Pro Original API / Contra Mirror API

  • The amount of work that a mirror API would have involved.
  • Allow the validation to provide an error correction facility.

Notes on the class model

It would also have been possible to create less classes. But then the handling of enabling / disabling individual checks would have required more coding. I believe that this model is the best balance between an API that is powerful, small and easy to use. The number of classes is a bit high but all classes are extremely small.