ConfigurationValidator@Public
@Evolving
public class BooleanConfigurationBasicValidator
extends java.lang.Object
| Constructor | Description |
|---|---|
BooleanConfigurationBasicValidator(java.lang.String configKey,
boolean defaultVal,
boolean throwIfInvalid) |
| Modifier and Type | Method | Description |
|---|---|---|
java.lang.String |
getConfigKey() |
|
T |
getDefaultVal() |
|
boolean |
getThrowIfInvalid() |
|
java.lang.Boolean |
validate(java.lang.String configValue) |
This method handles the base case where the configValue is null, based on the throwIfInvalid it either throws or returns the defaultVal,
otherwise it returns null indicating that the configValue needs to be validated further.
|
public BooleanConfigurationBasicValidator(java.lang.String configKey,
boolean defaultVal,
boolean throwIfInvalid)
public java.lang.Boolean validate(java.lang.String configValue)
throws InvalidConfigurationValueException
validate in interface ConfigurationValidatorconfigValue - the configuration value set by the userInvalidConfigurationValueException - in case the configValue is null and required to be setpublic T getDefaultVal()
public java.lang.String getConfigKey()
public boolean getThrowIfInvalid()
Copyright © 2008–2025 Apache Software Foundation. All rights reserved.