java.lang.Object
be.dezijwegel.betteryaml.validation.validator.Validator
be.dezijwegel.betteryaml.validation.validator.string.StringWhiteList

public class StringWhiteList
extends Validator
  • Constructor Summary

    Constructors
    Constructor Description
    StringWhiteList​(@NotNull String defaultValue, boolean ignoreCase, String... allowedValue)
    Provide a list of strings that are allowed for this setting and a default value The object is maintained if it is an allowed value If the object is not allowed, the default value will be returned
  • Method Summary

    Modifier and Type Method Description
    Object validate​(@NotNull Object o)  

    Methods inherited from class java.lang.Object

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

    • StringWhiteList

      public StringWhiteList​(@NotNull @NotNull String defaultValue, boolean ignoreCase, String... allowedValue)
      Provide a list of strings that are allowed for this setting and a default value The object is maintained if it is an allowed value If the object is not allowed, the default value will be returned
      Parameters:
      defaultValue - the default value to fall back to for faulty inputs
      ignoreCase - whether upper/lowercase matters
      allowedValue - zero, one, or more allowed values (all other inputs are blacklisted)
  • Method Details