edu.columbia.surge.hashImpl
Class CommonFactoryH

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

public class CommonFactoryH
extends java.lang.Object
implements CommonFactory

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

See Also:
CommonH

Field Summary
static CommonFactoryH factory
          The static instance which helps users to access to the methods in this class.
 
Method Summary
 Common create()
          A factory method which creates an instance of CommonH without any given parameters.
 Common create(java.lang.String lex)
          A factory method which creates an instance of CommonH with the given lexical entry.
 Common create(java.lang.String lex, boolean definite)
          A factory method which creates an instance of CommonH with the given lexical entry and a boolean to specify whether the lex should be definite.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

factory

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

create

public Common create()
A factory method which creates an instance of CommonH without any given parameters.
Specified by:
create in interface CommonFactory

create

public Common create(java.lang.String lex)
              throws InvalidConstructorException
A factory method which creates an instance of CommonH with the given lexical entry. If the lexical entry is invalid, an InvalidConstructorException should be thrown.
Specified by:
create in interface CommonFactory
Parameters:
lex - lexical entry

create

public Common create(java.lang.String lex,
                     boolean definite)
              throws InvalidConstructorException
A factory method which creates an instance of CommonH with the given lexical entry and a boolean to specify whether the lex should be definite. If the lexical entry is invalid, an InvalidConstructorException should be thrown.
Specified by:
create in interface CommonFactory
Parameters:
lex - lexical entry
definite - set whether the lex should be definite. Input true to be definite.