|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectuk.co.jemos.podam.api.RandomDataProviderStrategy
public class RandomDataProviderStrategy
Default implementation of a DataProviderStrategy
This default implementation returns values based on a random generator. Don't use this implementation if you seek deterministic values
All values returned by this implementation are different from zero.
This implementation is a Singleton
Field Summary | |
---|---|
private static org.apache.log4j.Logger |
LOG
Application logger |
private static Random |
RANDOM
A RANDOM generator |
private static RandomDataProviderStrategy |
SINGLETON
The singleton instance of this implementation |
Constructor Summary | |
---|---|
private |
RandomDataProviderStrategy()
Implementation of the Singleton pattern |
Method Summary | |
---|---|
Boolean |
getBoolean()
It returns a boolean/Boolean value. |
Byte |
getByte()
It returns a byte/Byte value. |
Byte |
getByteInRange(byte minValue,
byte maxValue)
It returns a byte/Byte within min and max value (included). |
Character |
getCharacter()
It returns a char/Character value. |
Character |
getCharacterInRange(char minValue,
char maxValue)
It returns a char/Character value between min and max value (included). |
Double |
getDouble()
It returns a double/Double value |
Double |
getDoubleInRange(double minValue,
double maxValue)
It returns a double/Double value between min and max value (included). |
Float |
getFloat()
It returns a float/Float value. |
Float |
getFloatInRange(float minValue,
float maxValue)
It returns a float/Float value between min and max value (included). |
static RandomDataProviderStrategy |
getInstance()
Implementation of the Singleton pattern |
Integer |
getInteger()
It returns an int/Integer value. |
int |
getIntegerInRange(int minValue,
int maxValue)
It returns an int/Integer value between min and max value (included). |
Long |
getLong()
It returns a long/Long value. |
Long |
getLongInRange(long minValue,
long maxValue)
It returns a long/Long value between min and max value (included). |
Short |
getShort()
It returns a short/Short value. |
Short |
getShortInRange(short minValue,
short maxValue)
It returns a short/Short value between min and max value (included). |
String |
getStringOfLength(int length)
It returns a String of length characters. |
String |
getStringValue()
It returns a string value |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static final Random RANDOM
private static final RandomDataProviderStrategy SINGLETON
private static final org.apache.log4j.Logger LOG
Constructor Detail |
---|
private RandomDataProviderStrategy()
Method Detail |
---|
public static RandomDataProviderStrategy getInstance()
public Boolean getBoolean()
getBoolean
in interface DataProviderStrategy
public Byte getByte()
getByte
in interface DataProviderStrategy
public Byte getByteInRange(byte minValue, byte maxValue)
getByteInRange
in interface DataProviderStrategy
minValue
- The minimum value for the returned valuemaxValue
- The maximum value for the returned value
public Character getCharacter()
getCharacter
in interface DataProviderStrategy
public Character getCharacterInRange(char minValue, char maxValue)
getCharacterInRange
in interface DataProviderStrategy
minValue
- The minimum value for the returned valuemaxValue
- The maximum value for the returned value
public Double getDouble()
getDouble
in interface DataProviderStrategy
public Double getDoubleInRange(double minValue, double maxValue)
getDoubleInRange
in interface DataProviderStrategy
minValue
- The minimum value for the returned valuemaxValue
- The maximum value for the returned value
public Float getFloat()
getFloat
in interface DataProviderStrategy
public Float getFloatInRange(float minValue, float maxValue)
getFloatInRange
in interface DataProviderStrategy
minValue
- The minimum value for the returned valuemaxValue
- The maximum value for the returned value
public Integer getInteger()
getInteger
in interface DataProviderStrategy
public int getIntegerInRange(int minValue, int maxValue)
getIntegerInRange
in interface DataProviderStrategy
minValue
- The minimum value for the returned valuemaxValue
- The maximum value for the returned value
public Long getLong()
getLong
in interface DataProviderStrategy
public Long getLongInRange(long minValue, long maxValue)
getLongInRange
in interface DataProviderStrategy
minValue
- The minimum value for the returned valuemaxValue
- The maximum value for the returned value
public Short getShort()
getShort
in interface DataProviderStrategy
public Short getShortInRange(short minValue, short maxValue)
getShortInRange
in interface DataProviderStrategy
minValue
- The minimum value for the returned valuemaxValue
- The maximum value for the returned value
public String getStringValue()
getStringValue
in interface DataProviderStrategy
public String getStringOfLength(int length)
length
characters.
getStringOfLength
in interface DataProviderStrategy
length
- The number of characters required in the returned String
length
characters
|
Jemos 2002 - 2011: All Rights Reserved. Podam runs under the MIT license | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |