org.problets.domain.model.implement
Class RandomModel
java.lang.Object
org.problets.domain.model.implement.RandomModel
public class RandomModel
- extends java.lang.Object
To hold a random valye (R1, R2, etc) along with its data type
- Author:
- Amruth Kumar
Constructor Summary |
RandomModel(java.lang.String template,
java.lang.String contextDataType)
template is a complete random constant string, enclosed in angle brackets
and including any constraints, themselves separated by semicolons and
enclosed in # symbol. |
Method Summary |
java.lang.String |
getDataType()
Returns the data type used for this random object |
Value |
getValue()
|
static void |
main(java.lang.String[] args)
|
void |
print()
|
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RandomModel
public RandomModel(java.lang.String template,
java.lang.String contextDataType)
- template is a complete random constant string, enclosed in angle brackets
and including any constraints, themselves separated by semicolons and
enclosed in # symbol.
contextDataType is the data type to be used for this random number
if constraints do not specify a data type
Bounds constraint has to be specified in increasing order,
so the constraint is of the form:
value1<=R1<=value2. <= could be < in either place. Either bound is optional.
value1>=R1>=value2 IS NOT ALLOWED.
getValue
public Value getValue()
getDataType
public java.lang.String getDataType()
- Returns the data type used for this random object
print
public void print()
main
public static void main(java.lang.String[] args)