edu.columbia.surge
Interface NPFactory

All Known Implementing Classes:
NPFactoryH

public abstract interface 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.

See Also:
NP

Field Summary
static NPFactory 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 NP.
 NP create(FD head)
          A factory method which creates an instance of NP with the given head.
 NP create(java.lang.String lex)
          A factory method which creates an instance of NP with the given lexical entry.
 

Field Detail

factory

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

create

public NP create()
A factory method which creates a default instance of NP.
Returns:
a default instance of NP

create

public NP create(java.lang.String lex)
          throws InvalidConstructorException
A factory method which creates an instance of NP with the given lexical entry.
Parameters:
lex - the lexical entry of the np.
Returns:
an instance of NP with the given lexical entry

create

public NP create(FD head)
          throws InvalidConstructorException
A factory method which creates an instance of NP with the given head.
Parameters:
head - the head entry of the np.
Returns:
an instance of NP with the given head entry