edu.columbia.surge
Interface ProperFactory

All Known Implementing Classes:
ProperFactoryH

public abstract interface ProperFactory

This class holds the factory methods for the Proper class. Users can use this class to create instances of Proper objects with their desired parameters.

See Also:
Proper

Field Summary
static ProperFactory factory
          The static instance which helps users to access to the methods in this class.
 
Method Summary
 Proper create()
          A factory method which creates a default instance of ProperFactory.
 Proper create(java.lang.String lex)
          A factory method to compute and return an object of type Proper with the given lexical entry An InvalidConstructorException will be thrown if the given lexical entry is invalid.
 Proper create(java.lang.String lex, boolean plurality)
          A factory method to compute and return an object of type Proper with the given lexical entry and specification of plurality.
 

Field Detail

factory

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

create

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

create

public Proper create(java.lang.String lex)
              throws InvalidConstructorException
A factory method to compute and return an object of type Proper with the given lexical entry An InvalidConstructorException will be thrown if the given lexical entry is invalid.
Parameters:
lex - the proper noun
Returns:
an object of type Proper with the given lexical entry

create

public Proper create(java.lang.String lex,
                     boolean plurality)
              throws InvalidConstructorException
A factory method to compute and return an object of type Proper with the given lexical entry and specification of plurality. An InvalidConstructorException will be thrown if the given lexical entry is invalid.
Parameters:
lex - the proper noun
plurality - set whether the proper noun should be plural, true to be plural.
Returns:
an object of type Proper with the given lexical entry and plurality