Class NumberValidator

  • All Implemented Interfaces:
    Validator<java.lang.String>

    public class NumberValidator
    extends java.lang.Object
    implements Validator<java.lang.String>
    A validator that returns an error if the input string is not a valid number.
    • Constructor Summary

      Constructors 
      Constructor Description
      NumberValidator​(java.lang.String message)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String validate​(java.lang.String value)
      Validate a value.
      • Methods inherited from class java.lang.Object

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

      • NumberValidator

        public NumberValidator​(java.lang.String message)
    • Method Detail

      • validate

        public java.lang.String validate​(java.lang.String value)
        Description copied from interface: Validator
        Validate a value.
        Specified by:
        validate in interface Validator<java.lang.String>
        Parameters:
        value - the value to validate
        Returns:
        a description of the validation errors or null