public class StringValueProducer extends AbstractValueProducer<JsonStringNode>
JsonStringNode which can generate json string value.| 构造器和说明 |
|---|
StringValueProducer() |
| 限定符和类型 | 方法和说明 |
|---|---|
protected int |
getDefaultLength()
Returns the default length of the random string to be generated.
|
protected int |
getDefaultMax(int min)
Returns the default maximal length if it is not given in the map parameter.
|
protected int |
getDefaultMin(int max)
Returns the default minimal length is it is not given in the map parameter.
|
String |
getTypeName()
Returns the name of the producer used in the template.
|
JsonStringNode |
produce()
Produces a node which can generate a random alphabetic string with length
getDefaultLength(). |
JsonStringNode |
produce(List<String> valueList)
Produces a node which select a string in a list.
|
JsonStringNode |
produce(Map<String,String> paramMap)
Produces a node which generate string based on a configuration.
|
JsonStringNode |
produce(String value)
Produces a node which can generate a fixed string.
|
String |
produceString(int length)
Produces a random alphabetic string with a given length
|
pickBooleanParam, pickFloatParam, pickIntegerParam, pickStringParam, randomFloatInRange, randomIntInRange, shouldBeInAscOrder, shouldBeInAscOrder, shouldBePositive, validateParamMappublic String getTypeName()
IValueProducerpublic JsonStringNode produce()
getDefaultLength().produce 在接口中 IValueProducer<JsonStringNode>produce 在类中 AbstractValueProducer<JsonStringNode>public JsonStringNode produce(String value)
produce 在接口中 IValueProducer<JsonStringNode>produce 在类中 AbstractValueProducer<JsonStringNode>value - the fixed json string valuepublic JsonStringNode produce(List<String> valueList)
produce 在接口中 IValueProducer<JsonStringNode>produce 在类中 AbstractValueProducer<JsonStringNode>valueList - the enumerated string valuespublic JsonStringNode produce(Map<String,String> paramMap)
produce 在接口中 IValueProducer<JsonStringNode>produce 在类中 AbstractValueProducer<JsonStringNode>paramMap - configurationprotected int getDefaultLength()
protected int getDefaultMax(int min)
min - the specified minimal boundprotected int getDefaultMin(int max)
max - the specified maximal boundpublic String produceString(int length)
length - the expected length of the string to be generatedCopyright © 2019. All rights reserved.