Interface ValueValidator

All Known Implementing Classes:
NonEmptyStringValidator
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface ValueValidator
Functional interface for validating configuration entries.
Author:
A248
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    validate​(String key, Object value)
    Validates a value.
  • Method Details

    • validate

      void validate(String key, Object value) throws BadValueException
      Validates a value. The value provided is the one after any type conversions. It may be casted to the config method's return type.
      Parameters:
      key - the key, used to construct BadValueException
      value - the value
      Throws:
      BadValueException - if the value is invalid