org.gjt.universe
Class Names

java.lang.Object
  |
  +--org.gjt.universe.Names

class Names
extends java.lang.Object

The Names class randomly creates names used in the program. These names are created from syllables that are found in the Names.txt file. The class is responsible to make sure that no duplicate names are created.


Field Summary
private static java.util.Random randomGenerator
           
private static Names singleton
           
private  java.util.Vector syllables
           
private  java.util.Hashtable used
           
 
Constructor Summary
private Names()
           
 
Method Summary
static java.lang.String getName()
          Returns another random name.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

singleton

private static Names singleton

syllables

private java.util.Vector syllables

used

private java.util.Hashtable used

randomGenerator

private static java.util.Random randomGenerator
Constructor Detail

Names

private Names()
Method Detail

getName

public static java.lang.String getName()
Returns another random name.



Copyright © 2001 Universe Dev Team All Rights Reserved.