net.sf.adatagenerator.util
Class IntegerFrequencyFile
java.lang.Object
net.sf.adatagenerator.util.IntegerFrequencyFile
- All Implemented Interfaces:
- FrequencyBasedListFactory<Integer>
public class IntegerFrequencyFile
- extends Object
- implements FrequencyBasedListFactory<Integer>
Initializes a frequency based list of Integer values by reading the relative
frequency of the values from a csv text file of values and counts; e.g.
integer1, 21
integer2, 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
IntegerFrequencyFile
public IntegerFrequencyFile(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<Integer> 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<Integer>
- See Also:
FrequencyBasedList.getValueComparator()
createFrequencyBasedList
public FrequencyBasedList<Integer> createFrequencyBasedList()
throws CreationException
- Specified by:
createFrequencyBasedList in interface FrequencyBasedListFactory<Integer>
- Throws:
CreationException
Copyright © 2011-2012. All Rights Reserved.