Class AbstractValidator

java.lang.Object
org.openstreetmap.josm.data.validation.routines.AbstractValidator
Direct Known Subclasses:
DomainValidator, EmailValidator, InetAddressValidator, RegexValidator, UrlValidator

public abstract class AbstractValidator extends Object
Abstract validator superclass to extend Apache Validator routines.
Since:
7489
  • Field Details

  • Constructor Details

  • Method Details

    • isValid

      public abstract boolean isValid(String value)
      Tests validity of a given value.
      Parameters:
      value - Value to test
      Returns:
      true if value is valid, false otherwise
    • getValidatorName

      public abstract String getValidatorName()
      Returns the name of this validator
      Returns:
      the name of this validator
    • getErrorMessage

      public final String getErrorMessage()
      Replies the error message.
      Returns:
      the errorMessage
    • setErrorMessage

      protected final void setErrorMessage(String errorMessage)
      Sets the error message.
      Parameters:
      errorMessage - the errorMessage