public class IntegerValueProducer extends AbstractValueProducer<JsonIntegerNode>
JsonIntegerNode which can generate json numeric(integer) value.| 构造器和说明 |
|---|
IntegerValueProducer() |
| 限定符和类型 | 方法和说明 |
|---|---|
protected int |
getDefaultMax()
Returns the default maximal bound of the default range.
|
protected int |
getDefaultMax(int min)
Returns the default maximal bound if the minimal bound is not given in
the map parameter.
|
protected int |
getDefaultMin()
Returns the default mininal bound of the default range.
|
protected int |
getDefaultMin(int max)
Returns the default minimal bound if the maximal bound is not given in
the map parameter.
|
String |
getTypeName()
Returns the name of the producer used in the template.
|
JsonIntegerNode |
produce()
Produces a node which can generate a random integer.
|
JsonIntegerNode |
produce(List<String> valueList)
Produces a node which selects a string in a list.
|
JsonIntegerNode |
produce(Map<String,String> paramMap)
Produces a node which generates an integer based on a configuration.
|
JsonIntegerNode |
produce(String value)
Produces a node which can generate a fixed integer.
|
pickBooleanParam, pickFloatParam, pickIntegerParam, pickStringParam, randomFloatInRange, randomIntInRange, shouldBeInAscOrder, shouldBeInAscOrder, shouldBePositive, validateParamMappublic String getTypeName()
IValueProducerpublic JsonIntegerNode produce()
getDefaultMin() and getDefaultMax()
By default, the range is 0 to 100.produce 在接口中 IValueProducer<JsonIntegerNode>produce 在类中 AbstractValueProducer<JsonIntegerNode>public JsonIntegerNode produce(String value)
produce 在接口中 IValueProducer<JsonIntegerNode>produce 在类中 AbstractValueProducer<JsonIntegerNode>value - the string representation of the integerpublic JsonIntegerNode produce(List<String> valueList)
produce 在接口中 IValueProducer<JsonIntegerNode>produce 在类中 AbstractValueProducer<JsonIntegerNode>valueList - the enumerated string valuespublic JsonIntegerNode produce(Map<String,String> paramMap)
getDefaultMax(int) which is 2 times
greater than the minimal length.
getDefaultMin(int) which is 0
produce 在接口中 IValueProducer<JsonIntegerNode>produce 在类中 AbstractValueProducer<JsonIntegerNode>paramMap - configurationprotected int getDefaultMax()
protected int getDefaultMin()
protected int getDefaultMax(int min)
min - the specified minimal boundprotected int getDefaultMin(int max)
max - the specified maximal boundCopyright © 2019. All rights reserved.