edu.columbia.surge.hashImpl
Class NPFactoryH
java.lang.Object
|
+--edu.columbia.surge.hashImpl.NPFactoryH
- public class NPFactoryH
- extends java.lang.Object
- implements NPFactory
This class holds the factory methods for the NP class. Users can
use this class to create instances of NP objects with their desired
parameters. A static keyword is used to instantiate an instance of
NPFactoryH so that the static variable "factory" in this class will
have access to the create methods. Users can also create instances
of NPH directly using the constructors of the NP class. The primary
reason of the creation of this class is to allow the NP class,
which implements the NP interface to have constructors while being
able to implement all the methods in the interface.
- See Also:
NPH
Field Summary |
static NPFactoryH |
factory
The static instance which helps users to access to the methods
in this class. |
Method Summary |
NP |
create()
A factory method which creates a default instance of NPH. |
NP |
create(FD head)
A factory method which creates an instance of NPH with the
given head. |
NP |
create(java.lang.String lex)
A factory method which creates an instance of NPH with the
given lexical entry. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
factory
public static NPFactoryH factory
- The static instance which helps users to access to the methods
in this class.
create
public NP create()
- A factory method which creates a default instance of NPH.
- Specified by:
- create in interface NPFactory
- Returns:
- a default instance of NPH
create
public NP create(java.lang.String lex)
throws InvalidConstructorException
- A factory method which creates an instance of NPH with the
given lexical entry.
- Specified by:
- create in interface NPFactory
- Parameters:
lex
- the lexical entry of the np.- Returns:
- an instance of NPH with the given lexical entry
create
public NP create(FD head)
throws InvalidConstructorException
- A factory method which creates an instance of NPH with the
given head.
- Specified by:
- create in interface NPFactory
- Parameters:
head
- the head entry of the np.- Returns:
- an instance of NPH with the given head entry