edu.columbia.surge.hashImpl
Class PreModFactoryH

java.lang.Object
  |
  +--edu.columbia.surge.hashImpl.PreModFactoryH

public class PreModFactoryH
extends java.lang.Object
implements PreModFactory

This class holds the factory methods for the PreMod class. Users can use this class to create instances of PreMod objects with their desired parameters. A static keyword is used to instantiate an instance of PreModFactoryH so that the static variable "factory" in this class will have access to the create methods. Users can also create instances of PreModH directly using the constructors of the PreMod class. The primary reason of the creation of this class is to allow the PreMod class, which implements the PreMod interface to have constructors while being able to implement all the methods in the interface.

See Also:
PreModH

Field Summary
static PreModFactoryH factory
          The static instance which helps users to access to the methods in this class.
 
Method Summary
 PreMod create()
          A factory method which creates a default instance of PreModH.
 PreMod create(FD instrument)
          A factory method which takes it the instrument of a pred-modifier as parameter to compute and return an instance of PreModH.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

factory

public static PreModFactoryH factory
The static instance which helps users to access to the methods in this class.
Method Detail

create

public PreMod create()
A factory method which creates a default instance of PreModH.
Specified by:
create in interface PreModFactory
Returns:
a default instance of PreModH

create

public PreMod create(FD instrument)
              throws InvalidPathException,
                     InvalidConstructorException
A factory method which takes it the instrument of a pred-modifier as parameter to compute and return an instance of PreModH. Exception will be thrown when the instrucment FD is invalid.
Specified by:
create in interface PreModFactory
Parameters:
instrument - the instrument of the pred-modifier
Returns:
an instance of PreModH with the given instrument
Throws:
InvalidPathException -  
InvalidConstructorException -