public class NumberDataGenerator extends DataGenerator
Integer or Float.
The generator is seeded with a random number generator seed and a minimum and maximum allowed value. this information can be passed through methods or through the initialisation XML script. A random value between min and max is then generated for each new value instance.
| Constructor and Description |
|---|
NumberDataGenerator(org.licas_xml.abs.Element adminXml)
Create a new instance of NumberDataGenerator.
|
NumberDataGenerator(long thisSeed,
java.lang.String thisDataType)
Create a new instance of NumberDataGenerator.
|
| Modifier and Type | Method and Description |
|---|---|
protected static boolean |
dataTypeOK(java.lang.String theDataType)
Return true if the data type is allowed by the data generator.
|
java.lang.Object |
getNextValue()
Generate the next data value.
|
void |
parseGenXml(org.licas_xml.abs.Element genXml)
Parse the data generator script to set the appropriate variable values.
|
conditionsToXml, conditionsToXml, conditionsToXml, generateStringRange, getBaseElement, getDataType, getGeneratorClass, isAllowedDataType, setMaxValue, setMinValuepublic NumberDataGenerator(long thisSeed,
java.lang.String thisDataType)
throws java.lang.Exception
thisDataType - the generator data type.thisSeed - to seed a random number generator.java.lang.Exception - any error.public NumberDataGenerator(org.licas_xml.abs.Element adminXml)
throws java.lang.Exception
adminXml - a script including the value ranges for the data. This
would now be a full admin script, with an Const.PARAMETERS
section for these values.java.lang.Exception - any error.public void parseGenXml(org.licas_xml.abs.Element genXml)
parseGenXml in class DataGeneratorgenXml - the script to parsepublic java.lang.Object getNextValue()
getNextValue in class DataGeneratorprotected static boolean dataTypeOK(java.lang.String theDataType)
theDataType - the data type to check for.