com.bm.datagen.utils
Class BaseRandomDataGenerator

java.lang.Object
  extended by com.bm.datagen.utils.BaseRandomDataGenerator

public final class BaseRandomDataGenerator
extends java.lang.Object

This class creates pseudo random data for java primitives Date, String, etc.

Since:
07.10.2005
Author:
Daniel Wiese

Method Summary
static boolean getValueBoolean()
          Random boolean value.
static byte[] getValueByte(int length)
          Generates a random byte array.
static char getValueChar()
          Random char value.
static java.util.Date getValueDate()
          Generatetes a random Date.
static double getValueDouble()
          Random double value.
static float getValueFloat()
          Random float value.
static int getValueInt()
          Random int value.
static long getValueLong()
          Random long value.
static short getValueShort()
          Random short value.
static java.lang.String getValueString(int size, boolean isSimple)
          Generates a random string.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getValueInt

public static int getValueInt()
Random int value.

Returns:
random int value

getValueDouble

public static double getValueDouble()
Random double value.

Returns:
random double value

getValueFloat

public static float getValueFloat()
Random float value.

Returns:
random float value

getValueBoolean

public static boolean getValueBoolean()
Random boolean value.

Returns:
random boolean value

getValueByte

public static byte[] getValueByte(int length)
Generates a random byte array.

Parameters:
length - - the length of the byte array
Returns:
random boolean value

getValueChar

public static char getValueChar()
Random char value.

Returns:
random char value

getValueString

public static java.lang.String getValueString(int size,
                                              boolean isSimple)
Generates a random string.

Parameters:
size - - the size of the random string
isSimple - - if true only letters a-z and umlauts are generated
Returns:
random string value value

getValueDate

public static java.util.Date getValueDate()
Generatetes a random Date.

Returns:
- a random date

getValueLong

public static long getValueLong()
Random long value.

Returns:
random long value

getValueShort

public static short getValueShort()
Random short value.

Returns:
random short value


Copyright © 2008. All Rights Reserved.