edu.columbia.surge
Interface ParticFactory
- All Known Implementing Classes:
- ParticFactoryH
- public abstract interface ParticFactory
This class holds the factory methods for the Partic class. Users
can use this class to create instances of Partic objects with their
desired parameters.
- See Also:
Partic
Field Summary |
static ParticFactory |
factory
The static instance which helps users to access to the methods in
this class. |
Method Summary |
Partic |
create()
A factory method which creates a default instance of Partic. |
Partic |
create(java.lang.String particName,
FD particBody)
A factory method which creates an instance of Partic with the
given name and the body of the participant. |
Partic |
create(java.lang.String subjectName,
FD subjectBody,
java.lang.String objectName,
FD objectBody)
A factory method which creates an instance of Partic with the
given names and the bodies of the participant. |
factory
public static final ParticFactory factory
- The static instance which helps users to access to the methods in
this class.
create
public Partic create()
- A factory method which creates a default instance of Partic.
- Returns:
- a default instance of Partic
create
public Partic create(java.lang.String particName,
FD particBody)
throws InvalidConstructorException
- A factory method which creates an instance of Partic with the
given name and the body of the participant. If invalid name and
body are entered, an exception will be thrown.
- Parameters:
particName
- the name of the type of participantparticbody
- the specification of the participant- Returns:
- an instance of Partic with the given participant's
name and body
- Throws:
- InvalidConstructorException -
create
public Partic create(java.lang.String subjectName,
FD subjectBody,
java.lang.String objectName,
FD objectBody)
throws InvalidConstructorException
- A factory method which creates an instance of Partic with the
given names and the bodies of the participant. There are a lot
of instances participants come in the form of pairs. This
factory method allows users to create participant pairs in one
line of code. If invalid names and body entries are entered, an
exception will be thrown.
- Parameters:
subjectName
- the name of the type of the first participantsubjectBody
- the body specification of the first participantobjectName
- the name of the type of the other participantobjectBody
- the body specification of the other participant- Returns:
- an instance of Partic with the given participant pair.
- Throws:
- InvalidConstructorException -