Class fever.utils.Random

Description

Used to generate a stream of pseudorandom numbers, chars or words.

Field Index

LOWER_TYPE, MIXED_TYPE, UPPER_TYPE

Method Index

nextBoolean(), nextChar(), nextFloat(), nextInt(), nextWord()

Field Detail

UPPER_TYPE

static public UPPER_TYPE:String
Constant. Defines if char or worf must be in upper case or not.

LOWER_TYPE

static public LOWER_TYPE:String
Constant. Defines if char or worf must be in lower case or not.

MIXED_TYPE

static public MIXED_TYPE:String
Constant. Defines if char or worf can contain upper and lower case char.

Method Detail

nextBoolean

static public function nextBoolean():Boolean

Return a new random Boolean

nextFloat

static public function nextFloat(limit:Number):Number

Return a new random float

Parameters

limitLimit of possible generated number

nextInt

static public function nextInt(limit:Number):Number

Return a new random integer

Parameters

limitLimit of possible generated number

nextChar

static public function nextChar(readable:Boolean, type:String):String

Return a new random char

Parameters

readableIs generation still in human readable chars table
typePossible values are :

nextWord

static public function nextWord(limit:Number, type:String):String

Return a new random word

Parameters

limitMax chars in word ( must be > -1 and < 27 )
typePossible values are :