org.jfortune
Class FilePref

java.lang.Object
  extended byorg.jfortune.FilePref

public class FilePref
extends java.lang.Object

This is used to get percentages of each file. Something like fortune -f in the original fortune program


Constructor Summary
FilePref(java.util.ArrayList files)
          Constructor for FilePref.
FilePref(java.util.ArrayList files, boolean flag)
          Use this constructor when you want all files to have the same probability.
 
Method Summary
 java.util.ArrayList getPrefs()
          Returns an arraylist represeting the probability for each file.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FilePref

public FilePref(java.util.ArrayList files)
Constructor for FilePref. Use this one when you do not want all the files to have the same probabilities.

Parameters:
files - An arraylist of file names to be searched.

FilePref

public FilePref(java.util.ArrayList files,
                boolean flag)
Use this constructor when you want all files to have the same probability.

Parameters:
files - An arraylist of file names to be searched.
flag - This is not used. This is present to distinguish between the two constructors.
Method Detail

getPrefs

public java.util.ArrayList getPrefs()
Returns an arraylist represeting the probability for each file.

Returns:
ArrayList An arraylist represeting the probability for each file.