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