BaseRandom class abstract

Implementers

Constructors

BaseRandom(BaseLogger logger)

Properties

hashCode int
The hash code for this object.
no setterinherited
id int
getter/setter pair
logger BaseLogger
final
resetState List<int>
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

byteList(int length) List<int>
Returns a list of random bytes with a given length.
maskFactor(int factor) int
Removes the most significant bits from an multiply operand. Needed on restricted arithmetic.
maskOperand(int operand) int
Removes the most significant bits from an addition operand. Needed on restricted arithmetic.
next() int
Calculates the next seed.
nextDouble() double
Returns a random double with 0 <= rc < 1.
nextInt({int max = MaxInt, int min = 0}) int
Returns a random integer with 0 <= rc < max.
nextString(int length, [CharClass charClass = CharClass.chars96, String? charList]) String
Returns a random string with a given length. charClass: defines the characters of the result. charList is null or a string with all allowed characters. @throws FormatException if charClass is custom and charList is null.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
reset() → void
Sets the state to a well known state: the start state or the state of the last call of setStart()
restoreState(List<int> list) → void
saveState() List<int>
setResetState() → void
Sets the state used in reset(). Must be called in the constructor of each overloading class.
setSeed(String passphrase) → void
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Properties

alphanumerics String
final
chars64 String
final
chars95 String
final
chars96 String
final
decimals String
final
hexadecimals String
final
letters String
final
lowerCases String
final
nextId int
getter/setter pair
upperCases String
final
words String
final

Static Methods

getCharClassMembers(CharClass charClass) String?

Constants

MaxInt → const int