-
- All Implemented Interfaces:
-
icu.windea.breezeframework.core.component.Component,icu.windea.breezeframework.core.component.ConfigurableComponent,icu.windea.breezeframework.core.component.ConfigurableRandomGenerator,icu.windea.breezeframework.core.component.RandomGenerator,icu.windea.breezeframework.core.component.TypedComponent,icu.windea.breezeframework.core.model.Configurable
@ConfigParam(name = length, type = Int, defaultValue = 0, override = minLength, maxLength)@ConfigParam(name = minLength, type = Int, defaultValue = 0)@ConfigParam(name = maxLength, type = Int)@ConfigParam(name = source, type = String, defaultValue = ) public class RandomGenerator.RandomStringGenerator extends AbstractRandomGenerator<String> implements ConfigurableRandomGenerator<String>
配置参数说明:
length - 长度。(覆盖最小长度和最大长度)
minLength - 最小长度。
maxLength - 最大长度。
source - 源字符串,生成的字符串的字符会从中随机选取。
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public classRandomGenerator.RandomStringGenerator.Default
-
Constructor Summary
Constructors Constructor Description RandomGenerator.RandomStringGenerator(Map<String, Object> configParams)
-
Method Summary
Modifier and Type Method Description final IntegergetLength()final IntegergetMinLength()final IntegergetMaxLength()final StringgetSource()final Map<String, Object>getConfigParams()配置参数。 Class<String>getTargetType()目标类型。 RandomGenerator.RandomStringGeneratorconfigure(Map<String, Object> configParams)根据可选的配置参数,生成指定类型的随机值。 Stringgenerate()根据可选的配置参数,生成指定类型的随机值。 -
-
Method Detail
-
getMinLength
final Integer getMinLength()
-
getMaxLength
final Integer getMaxLength()
-
getConfigParams
final Map<String, Object> getConfigParams()
配置参数。
-
getTargetType
Class<String> getTargetType()
目标类型。
-
configure
RandomGenerator.RandomStringGenerator configure(Map<String, Object> configParams)
根据可选的配置参数,生成指定类型的随机值。
-
-
-
-