Class CompositeValidator.Builder
java.lang.Object
cloud.opencode.base.captcha.validator.CompositeValidator.Builder
- Enclosing class:
CompositeValidator
Builder for CompositeValidator
组合验证器构建器
Allows step-by-step construction of a CompositeValidator.
允许逐步构建组合验证器。
- Since:
- JDK 25, opencode-base-captcha V1.0.3
- Author:
- Leon Soo www.LeonSoo.com
-
Method Summary
Modifier and TypeMethodDescriptionaddValidator(CaptchaValidator validator) Adds a validator to the chain.build()Builds the CompositeValidator.
-
Method Details
-
addValidator
Adds a validator to the chain. 向链中添加验证器。- Parameters:
validator- the validator to add | 要添加的验证器- Returns:
- this builder | 此构建器
- Throws:
NullPointerException- if validator is null | 如果 validator 为 null
-
build
Builds the CompositeValidator. 构建组合验证器。- Returns:
- the composite validator | 组合验证器
- Throws:
IllegalStateException- if no validators have been added | 如果未添加任何验证器
-