Event Dispatcher
v0.1.6-beta.1
Project that offers a small library that allows to subscribe and fire events.
|
A class to generate pseudorandom sequences of strings.
Definition at line 11 of file RandomString.java.
Public Member Functions | |
RandomString (int length, Random random, String symbols) | |
RandomString (int length, Random random) | |
RandomString (int length, String symbols) | |
RandomString (int length) | |
String | nextString () |
Static Public Attributes | |
static final String | UPPER = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" |
static final String | LOWER = UPPER.toLowerCase(Locale.ROOT) |
static final String | DIGITS = "0123456789" |
static final String | ALPHANUM = UPPER + LOWER + DIGITS |
Private Attributes | |
final Random | random |
final char [] | symbols |
final char [] | buffer |
RandomString | ( | int | length, |
Random | random, | ||
String | symbols | ||
) |
Constructs a new random string generator instance used to create pseudorandom strings.
length | the random generated string size |
random | the class instance to generate pseudorandom strings |
symbols | the string containing all the symbols, that the random strings will be composed of |
Definition at line 29 of file RandomString.java.
RandomString | ( | int | length, |
Random | random | ||
) |
Constructs a new random string generator instance.
The random string will be formed with alphanumeric characters.
length | the random generated string size |
random | the class instance to generate pseudorandom strings |
Definition at line 49 of file RandomString.java.
RandomString | ( | int | length, |
String | symbols | ||
) |
Constructs a new random string generator instance used to create pseudorandom strings from a secure generator.
length | the random generated string size |
symbols | the string containing all the symbols, that the random strings will be composed of |
Definition at line 59 of file RandomString.java.
RandomString | ( | int | length | ) |
Constructs a new random string generator instance used to create pseudorandom strings from a secure generator.
The random string will be formed with alphanumeric characters.
length | the random generated string size |
Definition at line 71 of file RandomString.java.
String nextString | ( | ) |
Returns a pseudorandom, uniformly distributed.
value, from this random string generator's sequence. The general contract of
is that one
value formed with the available symbols is pseudorandomly generated and returned. All possible
values are produced with (approximately) equal probability. The method
is implemented using the provided
class's methods.
The probability of a collision,
, is approximately n2/(2qx), where
is the number of identifiers actually generated,
is the number of distinct symbols in the alphabet, and
is the length of the generated string. The longer the
is, the lower the probability of a collision taking place is.
Definition at line 92 of file RandomString.java.
|
static |
Definition at line 13 of file RandomString.java.
|
static |
Definition at line 14 of file RandomString.java.
|
static |
Definition at line 15 of file RandomString.java.
Definition at line 16 of file RandomString.java.
|
private |
Definition at line 18 of file RandomString.java.
|
private |
Definition at line 19 of file RandomString.java.
|
private |
Definition at line 20 of file RandomString.java.