Class AbstractValidator

    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.lang.String errorMessage  
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getErrorMessage()
      Replies the error message.
      abstract java.lang.String getValidatorName()
      Returns the name of this validator
      abstract boolean isValid​(java.lang.String value)
      Tests validity of a given value.
      protected void setErrorMessage​(java.lang.String errorMessage)
      Sets the error message.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • isValid

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

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

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

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