Class ValidPortValidator

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void initialize​(ValidPort annotation)
      Called before this validator is used with the constraint annotation value.
      boolean isValid​(java.lang.String name, java.lang.Object value)
      Indicates if the given value is valid.
      • Methods inherited from class java.lang.Object

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

      • ValidPortValidator

        public ValidPortValidator()
    • Method Detail

      • initialize

        public void initialize​(ValidPort annotation)
        Description copied from interface: ConstraintValidator
        Called before this validator is used with the constraint annotation value.
        Specified by:
        initialize in interface ConstraintValidator<ValidPort>
        Parameters:
        annotation - the annotation value this validator will be validating.
      • isValid

        public boolean isValid​(java.lang.String name,
                               java.lang.Object value)
        Description copied from interface: ConstraintValidator
        Indicates if the given value is valid.
        Specified by:
        isValid in interface ConstraintValidator<ValidPort>
        Parameters:
        name - the name to use for error reporting
        value - the value to validate.
        Returns:
        true if the given value is valid.