Class EmptyTextValidator

  • All Implemented Interfaces:
    Validator

    public class EmptyTextValidator
    extends java.lang.Object
    implements Validator
    A validator for a (trimmed) text.

    This is useful only when a value to be valid has to be absent.

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean isValid​(java.lang.String text)
      Determines if a text value is valid based on the rules of the validator.
      • Methods inherited from class java.lang.Object

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

      • EmptyTextValidator

        public EmptyTextValidator()
    • Method Detail

      • isValid

        public boolean isValid​(java.lang.String text)
        Description copied from interface: Validator
        Determines if a text value is valid based on the rules of the validator.
        Specified by:
        isValid in interface Validator
        Parameters:
        text - The text to test.
        Returns:
        true if the value is valid; false, otherwise.