net.sf.adatagenerator.util
Class StringFrequencyFile
java.lang.Object
net.sf.adatagenerator.util.StringFrequencyFile
- All Implemented Interfaces:
- FrequencyBasedListFactory<String>
public class StringFrequencyFile
- extends Object
- implements FrequencyBasedListFactory<String>
Initializes a frequency based list of String values by reading the relative
frequency of the values from a csv text file of values and counts; e.g.
string1, 21
string2, 432
...
- Author:
- rphall
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
NULL_VALUE_MARKER
public static final String NULL_VALUE_MARKER
- See Also:
- Constant Field Values
StringFrequencyFile
public StringFrequencyFile(ClassLoader cl,
String fqrn)
- Parameters:
fqrn - a fully qualified resource name for the file from which
frequency-weighted data should be loaded.classLoader - a non-null class loader that will create an input stream from
the specified resource file
getFullyQualifiedResourceName
public String getFullyQualifiedResourceName()
getClassLoader
public ClassLoader getClassLoader()
getListComparator
public Comparator<String> getListComparator()
- Description copied from interface:
FrequencyBasedListFactory
- The comparator used to compare elements in the lists created by this
factory. May be null, if elements are compared by their natural
comparator.
- Specified by:
getListComparator in interface FrequencyBasedListFactory<String>
- See Also:
FrequencyBasedList.getValueComparator()
createFrequencyBasedList
public FrequencyBasedList<String> createFrequencyBasedList()
throws CreationException
- Specified by:
createFrequencyBasedList in interface FrequencyBasedListFactory<String>
- Throws:
CreationException
Copyright © 2011-2012. All Rights Reserved.