|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectloanfund.Randomizer
public class Randomizer
This class is used to create unique identifiers. The probability of two identifiers being identical should be 1/P_GOAL.
Field Summary | |
---|---|
private static long |
P_GOAL
|
private static java.security.SecureRandom |
rand
|
private static char[] |
values
|
Constructor Summary | |
---|---|
Randomizer()
|
Method Summary | |
---|---|
static java.lang.String |
nextID()
This method uses the default Random object to generate a unique number of appropriate length to satisfy the probability goal. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static final long P_GOAL
private static java.security.SecureRandom rand
private static char[] values
Constructor Detail |
---|
public Randomizer()
Method Detail |
---|
public static java.lang.String nextID()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |