All Packages Class Hierarchy This Package Previous Next Index
Class w3c.pics.db.DataStub
java.lang.Object
|
+----w3c.pics.db.DataStub
- public class DataStub
- extends Object
A DataStub is used to generate random numbers for other classes. A DataStub
can also generate random pseudo-profile files for use with the pseudo-label
files generated by a LabelMaker. To generate random PicsRULZ files, use a
RulzGenerator instead.
- See Also:
- LabelMaker, RulzGenerator
-
DataStub()
- Creates a new DataStub.
-
getRand()
- Returns a random number.
-
getRand(int)
- Returns a random number.
-
main(String[])
- A test method for DataStub.
-
writeFiles(int, boolean)
- Create random pseudo-profile files.
-
writeFiles(int, boolean, String)
- Create random pseudo-profile files.
DataStub
public DataStub()
- Creates a new DataStub.
writeFiles
public void writeFiles(int num,
boolean ran,
String name)
- Create random pseudo-profile files.
- Parameters:
- num - The number of files to create.
- ran - A boolean used to indicate if the category names in the
pseudo-profile files should be random or not.
- name - The basename for the label files.
writeFiles
public void writeFiles(int num,
boolean ran)
- Create random pseudo-profile files.
- Parameters:
- num - The number of files to create.
- ran - A boolean used to indicate if the category names in the
pseudo-profile files should be random or not.
main
public static void main(String args[])
- A test method for DataStub.
Use the following command-line arguments:
- count -- The number of random numbers you wish to generate.
- mod -- The number you wish to mod each random number by (optional).
This method will create the specified number of random numbers, and
mod them by the optional mod argument.
The results are printed to System.out.
getRand
public int getRand()
- Returns a random number.
- Returns:
- An random integer.
getRand
public int getRand(int divnum)
- Returns a random number.
- Parameters:
- divnum - An internal constant for use by the DataStub. The larger
this number is, the smaller the range of numbers will be produced by
the DataStub.
All Packages Class Hierarchy This Package Previous Next Index