Class NotNullValidator<V>

  • Type Parameters:
    V - the class of the value
    All Implemented Interfaces:
    Validator<V>

    public class NotNullValidator<V>
    extends java.lang.Object
    implements Validator<V>
    A validation that returns an error if the value is null.
    • Constructor Summary

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

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

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

      • NotNullValidator

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

      • validate

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