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 @Deprecated public interface ValueValidator
Deprecated.
Value validators will be removed in DazzleConf 2.0 since they do not fit the new API model. Meanwhile, you might save time by switching usage of this class to modifying your value serialisers and checking output values appropriately. If need be, make new types that uphold your requirements.
Functional interface for validating configuration entries.
Author:
A248
  • Method Summary

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

    • validate

      void validate(String key, Object value) throws BadValueException
      Deprecated.
      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