Package repast.simphony.engine.schedule
Class DefaultScheduleFactory
- java.lang.Object
-
- repast.simphony.engine.schedule.DefaultScheduleFactory
-
- All Implemented Interfaces:
IScheduleFactory
public class DefaultScheduleFactory extends Object implements IScheduleFactory
A schedule factory that constructsSchedule
s.- Version:
- $Revision: 1.1 $ $Date: 2005/12/21 22:25:34 $
- Author:
- Jerry Vos
-
-
Constructor Summary
Constructors Constructor Description DefaultScheduleFactory()
Synonymous with DefaultScheduleFactory(new DefaultSchedulableActionFactory)DefaultScheduleFactory(ISchedulableActionFactory defaultActionFactory)
Constructs this ScheduleFactory which will default to creating schedules with the specified action factory
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ISchedule
createSchedule()
Creates a Schedule that by default uses the factory set in this interface to create its scheduled actions.ISchedule
createSchedule(ISchedulableActionFactory factory)
Creates a Schedule that will use the specified ISchedulableActionFactory to create its scheduled actions.void
setDefaultSchedulableActionFactory(ISchedulableActionFactory defaultFactory)
Sets the action factory that will be used when createSchedule is called with no arguments.
-
-
-
Constructor Detail
-
DefaultScheduleFactory
public DefaultScheduleFactory()
Synonymous with DefaultScheduleFactory(new DefaultSchedulableActionFactory)
-
DefaultScheduleFactory
public DefaultScheduleFactory(ISchedulableActionFactory defaultActionFactory)
Constructs this ScheduleFactory which will default to creating schedules with the specified action factory- Parameters:
defaultActionFactory
- the default action factory the created schedules will be fed
-
-
Method Detail
-
createSchedule
public ISchedule createSchedule(ISchedulableActionFactory factory)
Creates a Schedule that will use the specified ISchedulableActionFactory to create its scheduled actions.- Specified by:
createSchedule
in interfaceIScheduleFactory
- Parameters:
factory
- the factory to use to create the actions that the Schedule will schedule- Returns:
- a schedule that uses the specified factory
-
createSchedule
public ISchedule createSchedule()
Creates a Schedule that by default uses the factory set in this interface to create its scheduled actions. The behavior that occurs when a default action factory has not been set is per-implementation specific, but in most cases there should be a reasonable default.- Specified by:
createSchedule
in interfaceIScheduleFactory
- Returns:
- a schedule that uses the default factory
-
setDefaultSchedulableActionFactory
public void setDefaultSchedulableActionFactory(ISchedulableActionFactory defaultFactory)
Sets the action factory that will be used when createSchedule is called with no arguments.- Specified by:
setDefaultSchedulableActionFactory
in interfaceIScheduleFactory
- Parameters:
defaultFactory
- the default factory to use if one isn't specified
-
-