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

Constructor Index

 o DataStub()
Creates a new DataStub.

Method Index

 o getRand()
Returns a random number.
 o getRand(int)
Returns a random number.
 o main(String[])
A test method for DataStub.
 o writeFiles(int, boolean)
Create random pseudo-profile files.
 o writeFiles(int, boolean, String)
Create random pseudo-profile files.

Constructors

 o DataStub
 public DataStub()
Creates a new DataStub.

Methods

 o 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.
 o 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.
 o main
 public static void main(String args[])
A test method for DataStub. Use the following command-line arguments:
  1. count -- The number of random numbers you wish to generate.
  2. 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.

 o getRand
 public int getRand()
Returns a random number.

Returns:
An random integer.
 o 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