public class RandomValues extends Object implements Serializable
RandomValuesPrms,
Serialized Form| Modifier and Type | Field and Description |
|---|---|
boolean |
createDebug |
boolean |
logProgress |
boolean |
modifyDebug |
| Constructor and Description |
|---|
RandomValues()
Create randomValues instance using the hydra params in RandomValuesPrms.
|
RandomValues(Long objectType_paramKey)
Create randomValues using the specified hydra config variable for
the RandomValuesPrms.objectType parameter.
|
| Modifier and Type | Method and Description |
|---|---|
void |
createDepth(Object anObj)
Add elements to anObj, creating an object graph with depth specified by
using the Hydra param keys specified in this instance of RandomValues.
|
Object |
getRandom_array(String type) |
byte[] |
getRandom_arrayOfBytes()
Return a random array of bytes.
|
BigDecimal |
getRandom_BigDecimal()
Return a random BigDecimal, using the hydra parameter borderCasePercentage to
randomly choose border case values (ie min/max etc)
|
BigInteger |
getRandom_BigInteger()
Return a random BigInteger, using the hydra parameter borderCasePercentage to
randomly choose border case values (ie min/max etc)
|
boolean |
getRandom_boolean()
Return a random boolean.
|
byte |
getRandom_byte()
Return a random byte, using the hydra parameter borderCasePercentage to
randomly choose border case values (ie min/max etc)
|
byte |
getRandom_byteBorderCase()
Return a random border case byte (ie min/max etc).
|
char |
getRandom_char()
Return a random char, using the hydra parameter borderCasePercentage to
randomly choose border case values (ie min/max etc)
|
char |
getRandom_charBorderCase()
Return a random border case char (ie min/max etc).
|
double |
getRandom_double()
Return a random double, using the hydra parameter borderCasePercentage to
randomly choose border case values (ie min/max etc)
|
double |
getRandom_doubleBorderCase()
Return a random border case double (ie min/max etc).
|
float |
getRandom_float()
Return a random float, using the hydra parameter borderCasePercentage to
randomly choose border case values (ie min/max etc)
|
float |
getRandom_floatBorderCase()
Return a random border case float (ie min/max etc).
|
int |
getRandom_int()
Return a random int, using the hydra parameter borderCasePercentage to
randomly choose border case values (ie min/max etc)
|
int |
getRandom_intBorderCase()
Return a random border case int (ie min/max etc).
|
List |
getRandom_List(Class aClass) |
long |
getRandom_long()
Return a random long, using the hydra parameter borderCasePercentage to
randomly choose border case values (ie min/max etc)
|
long |
getRandom_longBorderCase()
Return a random border case long (ie min/max etc).
|
Map |
getRandom_Map(Class aClass) |
Object |
getRandom_Object(String dataTypeName)
Return a random Object of the given class, using a no arg constructor,
or a constructor with a length (int) arg.
|
Set |
getRandom_Set(Class aClass) |
short |
getRandom_short()
Return a random short, using the hydra parameter borderCasePercentage to
randomly choose border case values (ie min/max etc)
|
short |
getRandom_shortBorderCase()
Return a random border case short (ie min/max etc).
|
String |
getRandom_String()
Return a random String, using the hydra parameter borderCasePercentage to
randomly choose border case values (ie min/max etc).
|
String |
getRandom_String(char doubleChar,
int size)
Return a random String, using the hydra parameter borderCasePercentage to
randomly choose border case values (ie min/max etc).
|
String |
getRandom_String(char doubleChar,
long size)
Return a random String, using the hydra parameter borderCasePercentage to
randomly choose border case values (ie min/max etc).
|
String |
getRandom_StringBorderCase()
Return a random border case String (ie min/max etc).
|
StringBuffer |
getRandom_StringBuffer()
Return a random StringBuffer, using the hydra parameter borderCasePercentage to
randomly choose border case values (ie min/max etc).
|
Object |
getRandomObject()
Return a random object, using the Hydra param keys specified in this
instance of RandomValues.
|
Object |
getRandomObject(Object extraObj)
Return a random object, using the Hydra param keys specified in this
instance of RandomValues.
|
Object |
getRandomObject(String className)
Return a random object with the given className, using the Hydra param keys
specified in this instance of RandomValues.
|
Object |
getRandomObjectGraph()
Return a random object graph, using the Hydra param keys specified in this
instance of RandomValues.
|
Object |
getRandomObjectGraph(Object extraObj)
Return a random object graph, using the Hydra param keys specified in this
instance of RandomValues.
|
Object |
getRandomObjectGraph(String className)
Return a random object graph with the given className, using the Hydra param keys
specified in this instance of RandomValues.
|
protected String |
getRandomString(int whichCase,
Character doubleChar,
long size)
Return a random string.
|
boolean |
modify(Object anObj) |
static void |
setPrintableChars(boolean lettersAndDigitsOnly) |
public boolean createDebug
public boolean modifyDebug
public boolean logProgress
public RandomValues()
public RandomValues(Long objectType_paramKey)
public static void setPrintableChars(boolean lettersAndDigitsOnly)
public Object getRandomObject()
public Object getRandomObject(Object extraObj)
extraObj - The special object used if the objectType chooses
the special String "this", typically used to create circular
references in objects (extraObj would be the collection that the
random object will be added to)public Object getRandomObjectGraph()
public Object getRandomObjectGraph(Object extraObj)
extraObj - The special object used if the objectType chooses
the special String "this", typically used to create circular
references in objects (extraObj would be the collection that the
random object will be added to)public Object getRandomObject(String className)
className - The class of the object to create.public Object getRandomObjectGraph(String className)
className - The class of the object to create.public int getRandom_int()
public int getRandom_intBorderCase()
public float getRandom_float()
public float getRandom_floatBorderCase()
public double getRandom_double()
public double getRandom_doubleBorderCase()
public boolean getRandom_boolean()
public byte getRandom_byte()
public byte getRandom_byteBorderCase()
public byte[] getRandom_arrayOfBytes()
public char getRandom_char()
public char getRandom_charBorderCase()
public long getRandom_long()
public long getRandom_longBorderCase()
public short getRandom_short()
public short getRandom_shortBorderCase()
public String getRandom_String(char doubleChar, int size)
public String getRandom_String(char doubleChar, long size)
public String getRandom_String()
public String getRandom_StringBorderCase()
protected String getRandomString(int whichCase, Character doubleChar, long size)
whichCase - Can be one of:
NORMAL_CASE
BORDER_CASE_MIN_VALUE
BORDER_CASE_MAX_VALUE
BORDER_CASE_ALT_VALUE
doubleChar Character to double if used (if the returned string is to be
used within quotes, this will allow a string to contain the
quote character).
size The desired size of the string, or use RandomValuesPrms.stringSize
if this is -1.public StringBuffer getRandom_StringBuffer()
public BigInteger getRandom_BigInteger()
public BigDecimal getRandom_BigDecimal()
public Object getRandom_Object(String dataTypeName)
dataTypeName - The fully qualified name of a class.public void createDepth(Object anObj)
RandomValuesPrms.objectDepthpublic boolean modify(Object anObj)
Copyright © 2010-2015 Pivotal Software, Inc. All rights reserved.