edu.columbia.surge.hashImpl
Class CircumFactoryH

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

public class CircumFactoryH
extends java.lang.Object
implements CircumFactory

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

See Also:
CircumH

Field Summary
static CircumFactoryH factory
           
 
Method Summary
 Circum create()
          The default factory method which creates an default instance of CircumH object without any parameters.
 Circum create(FD behalf, FD effect, FD inLoc, FD manner, FD purpose, FD reason, FD time, java.lang.String lex)
          The factory method which creates an instance of CircumH object with the given entries that tell and specify the circumstance.
 Circum create(java.lang.String propertyName, FD propertyBody, java.lang.String lex)
          The factory method which creates an instance of CircumH object with the given entries that tell and specify the circumstance.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

factory

public static CircumFactoryH factory
Method Detail

create

public Circum create()
The default factory method which creates an default instance of CircumH object without any parameters.
Specified by:
create in interface CircumFactory
Returns:
a default instance of CircumH.

create

public Circum create(java.lang.String propertyName,
                     FD propertyBody,
                     java.lang.String lex)
              throws InvalidConstructorException
The factory method which creates an instance of CircumH object with the given entries that tell and specify the circumstance. If invalid parameters are input, an exception will be thrown.
Specified by:
create in interface CircumFactory
Parameters:
propertyName - the name of the circumstance property
propertyBody - the body of the circumstance property
lex - the possible lexical entry of the circumstance
Returns:
an instance of CircumH instantiated with the property name and the specified properties.
Throws:
InvalidConstructorException -  

create

public Circum create(FD behalf,
                     FD effect,
                     FD inLoc,
                     FD manner,
                     FD purpose,
                     FD reason,
                     FD time,
                     java.lang.String lex)
              throws InvalidConstructorException
The factory method which creates an instance of CircumH object with the given entries that tell and specify the circumstance. This constructor accounts for all possible cirsumtances that users can specify. Among all the possible input circumstance characteristics, users should only enter one characteristic and set the rest of them be null. Otherwise, if more than one characteristics is inputted, an exception should be thrown. If invalid parameters are input, an exception will be thrown.
Specified by:
create in interface CircumFactory
Parameters:
behalf - the behalf characteristics of the circumstance
effect - the effect characteristics of the circumstance
inLoc - the in-location characteristics of the circumstance
manner - the manner characteristics of the circumstance
purpose - the purpose characteristics of the circumstance
reason - the reason characteristics of the circumstance
time - the time characteristics of the circumstance
lex - the possible lexical entry of the circumstance
Returns:
an instance of CircumH instantiated with the property name and the specified properties.
Throws:
InvalidConstructorException -