edu.columbia.surge.hashImpl
Class APFactoryH

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

public class APFactoryH
extends java.lang.Object
implements APFactory

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

See Also:
APH

Field Summary
static APFactoryH factory
          The static variable that is used to call the create() methods to create instances of the FD.
 
Method Summary
 AP create()
          The factory method to create a default instance of APH without ay parameters.
 AP create(FD head)
          The factory method to create an instance of APH with the given head entry represented as a FD.
 AP create(java.lang.String lex)
          The factory method to create an instance of APH with the given lexical entry.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

factory

public static APFactoryH factory
The static variable that is used to call the create() methods to create instances of the FD.
Method Detail

create

public AP create()
The factory method to create a default instance of APH without ay parameters.
Specified by:
create in interface APFactory
Returns:
a default instance of APH

create

public AP create(java.lang.String lex)
          throws InvalidConstructorException
The factory method to create an instance of APH with the given lexical entry.
Specified by:
create in interface APFactory
Parameters:
lex - the lexical entry of the FD
Returns:
an instance of APH which is instantiated with a given lexical entry.

create

public AP create(FD head)
          throws InvalidConstructorException
The factory method to create an instance of APH with the given head entry represented as a FD.
Specified by:
create in interface APFactory
Returns:
an instance of APH which is instantiated with a given head entry.