Revision: 180
Author: christianhujer
Date: 2006-06-25 05:17:28 -0700 (Sun, 25 Jun 2006)
ViewCVS: http://svn.sourceforge.net/gridarta/?rev=180&view=rev
Log Message:
-----------
Minor improvements.
Modified Paths:
--------------
trunk/crossfire/src/cfeditor/IdGenerator.java
Modified: trunk/crossfire/src/cfeditor/IdGenerator.java
===================================================================
--- trunk/crossfire/src/cfeditor/IdGenerator.java 2006-06-25 11:21:38 UTC (rev 179)
+++ trunk/crossfire/src/cfeditor/IdGenerator.java 2006-06-25 12:17:28 UTC (rev 180)
@@ -9,28 +9,28 @@
import java.util.HashSet;
import java.util.Random;
+import java.util.Set;
/**
+ * Generator for ids.
* @author tchize
- * <p/>
- * To change the template for this generated type comment go to
- * Window>Preferences>Java>Code Generation>Code and Comments
*/
public final class IdGenerator {
- private final HashSet unsecureUid;
+ private final Set<String> unsecureUid;
private final Random unSecureRandom;
- private static final IdGenerator theGen = new IdGenerator();
+ private static final IdGenerator INSTANCE = new IdGenerator();
- protected IdGenerator() {
- unsecureUid = new HashSet();
+ IdGenerator() {
+ unsecureUid = new HashSet<String>();
+ //noinspection UnsecureRandomNumberGeneration
unSecureRandom = new Random();
}
public static IdGenerator getInstance() {
- return theGen;
+ return INSTANCE;
}
public String getUnsecureId() {
@@ -44,4 +44,4 @@
return id;
}
-}
+} // class IdGenerator
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|