public class DictionaryNameFactory extends Object implements NameFactory
NameFactory generates names that are read from a
specified input file.
Comments (everything starting with '#' on a single line) are ignored.| Constructor and Description |
|---|
DictionaryNameFactory(DictionaryNameFactory dictionaryNameFactory,
NameFactory nameFactory)
Creates a new
DictionaryNameFactory. |
DictionaryNameFactory(File file,
NameFactory nameFactory)
Creates a new
DictionaryNameFactory. |
public DictionaryNameFactory(File file, NameFactory nameFactory) throws IOException
DictionaryNameFactory.file - the file from which the names can be read.nameFactory - the name factory from which names will be retrieved
if the list of read names has been exhausted.IOExceptionpublic DictionaryNameFactory(DictionaryNameFactory dictionaryNameFactory, NameFactory nameFactory)
DictionaryNameFactory.dictionaryNameFactory - the dictionary name factory whose dictionary
will be used.nameFactory - the name factory from which names will be
retrieved if the list of read names has been
exhausted.public void reset()
reset in interface NameFactorypublic String nextName()
nextName in interface NameFactorypublic static void main(String[] args)
Copyright © 2015. All Rights Reserved.