Class RandomNameLoader


  • public class RandomNameLoader
    extends java.lang.Object
    Load all potential names from a property file. The name are stored as values in the property file. The value of the key is ignored.
    Author:
    Andi Hotz, (c) Sahits GmbH, 2011 Created on Sep 17, 2011
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.util.List<java.lang.String> names  
      private java.util.Random rnd  
      private int size  
    • Constructor Summary

      Constructors 
      Constructor Description
      RandomNameLoader​(java.lang.String propFileName)
      Constructor initializing the base property file to be used.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getRandomName()
      Retrieve a random name
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • names

        private final java.util.List<java.lang.String> names
      • rnd

        private final java.util.Random rnd
      • size

        private final int size
    • Constructor Detail

      • RandomNameLoader

        public RandomNameLoader​(java.lang.String propFileName)
        Constructor initializing the base property file to be used.
        Parameters:
        propFileName - file name.
    • Method Detail

      • getRandomName

        public java.lang.String getRandomName()
        Retrieve a random name
        Returns:
        random name from the properties.