Class AbstractValidatorRange<V,​R>

    • Constructor Detail

      • AbstractValidatorRange

        public AbstractValidatorRange​(Range<R> range)
        The constructor.
        Parameters:
        range - is the Range the value has to be contained in.
    • Method Detail

      • getRange

        public Range<R> getRange()
        Returns:
        the Range to validate.
      • convertValue

        protected R convertValue​(V value)
        Converts the value to the type of the range.
        Parameters:
        value - is the value to convert.
        Returns:
        the converted value.
      • validateNotNull

        protected NlsMessage validateNotNull​(V value)
        Description copied from class: AbstractValueValidator
        This method performs the validation in case value is NOT null. This method contains the actual custom logic for the validation. It is therefore designed in a way that makes it most simple to implement custom validators.
        Specified by:
        validateNotNull in class AbstractValueValidator<V>
        Parameters:
        value - the value to validate.
        Returns:
        the failure message or null if the the given value is valid.
      • isLength

        protected boolean isLength()
        Returns:
        true if validating the lenght of the value, false otherwise.