edu.columbia.surge.hashImpl
Class PPFactoryH

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

public class PPFactoryH
extends java.lang.Object
implements PPFactory

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

See Also:
PPH

Field Summary
static PPFactoryH factory
          The static instance which helps users to access to the methods in this class.
 
Method Summary
 PP create()
          A factory method which creates a default instance of PPH.
 PP create(java.lang.String prep, FD np)
          A factory method which returns a PPH object with the input preposition and the body of the NP which resides in the prepositional phrase.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

factory

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

create

public PP create()
A factory method which creates a default instance of PPH.
Specified by:
create in interface PPFactory
Returns:
a default instance of PPH

create

public PP create(java.lang.String prep,
                 FD np)
          throws InvalidConstructorException,
                 InvalidPathException
A factory method which returns a PPH object with the input preposition and the body of the NP which resides in the prepositional phrase.
Specified by:
create in interface PPFactory
Parameters:
prep - the preposition of the PP
np - the NP within the PP
Returns:
a PP object which has the properties of the given parameters