Package repast.simphony.engine.schedule
Class DefaultContextSchedulableDescriptor<T>
- java.lang.Object
-
- repast.simphony.engine.schedule.DefaultDescriptor
-
- repast.simphony.engine.schedule.DefaultContextSchedulableDescriptor<T>
-
- All Implemented Interfaces:
ContextSchedulableDescriptor<T>
,Descriptor
,PredicateFiltered<T>
public class DefaultContextSchedulableDescriptor<T> extends DefaultDescriptor implements ContextSchedulableDescriptor<T>
Default implementation of aContextSchedulableDescriptor
.- Version:
- $Revision: 1.1 $ $Date: 2005/12/21 22:25:34 $
- Author:
- Jerry Vos
-
-
Constructor Summary
Constructors Constructor Description DefaultContextSchedulableDescriptor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.apache.commons.collections15.Predicate<T>
getFilter()
Retrieves the filter to use on the context to pull agents out and execute them.String
getMethodName()
Retrieves the name of the method to call on the filtered objects.ScheduleParameters
getScheduleParameters()
Retrieves the parameters for when the action should occur.boolean
getShuffle()
Retrieves whether or not to shuffle the list of objects before executing them or not.void
setFilter(org.apache.commons.collections15.Predicate<T> filter)
Sets the filter to use on the context to pull agents out and execute them.void
setMethodName(String methodName)
Sets the name of the method to call on the filtered objects.void
setScheduleParameters(ScheduleParameters scheduleParameters)
Sets the parameters for when the action should occur.void
setShuffle(boolean shuffle)
Sets whether or not to shuffle the list of objects before executing them or not.-
Methods inherited from class repast.simphony.engine.schedule.DefaultDescriptor
getName, setName
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface repast.simphony.engine.schedule.Descriptor
getName, setName
-
-
-
-
Method Detail
-
setFilter
public void setFilter(org.apache.commons.collections15.Predicate<T> filter)
Sets the filter to use on the context to pull agents out and execute them.- Specified by:
setFilter
in interfacePredicateFiltered<T>
- Parameters:
filter
- the filter to apply to the context
-
getFilter
public org.apache.commons.collections15.Predicate<T> getFilter()
Retrieves the filter to use on the context to pull agents out and execute them.- Specified by:
getFilter
in interfacePredicateFiltered<T>
- Returns:
- the filter to apply to the context
-
setShuffle
public void setShuffle(boolean shuffle)
Sets whether or not to shuffle the list of objects before executing them or not.- Specified by:
setShuffle
in interfaceContextSchedulableDescriptor<T>
- Parameters:
shuffle
- whether or not to shuffle the list of objects before executing them or not- See Also:
ISchedule.scheduleIterable(ScheduleParameters, Iterable, String, boolean, Object[])
-
getShuffle
public boolean getShuffle()
Retrieves whether or not to shuffle the list of objects before executing them or not.- Specified by:
getShuffle
in interfaceContextSchedulableDescriptor<T>
- Returns:
- whether or not to shuffle the list of objects before executing them or not
- See Also:
ISchedule.scheduleIterable(ScheduleParameters, Iterable, String, boolean, Object[])
-
getScheduleParameters
public ScheduleParameters getScheduleParameters()
Retrieves the parameters for when the action should occur.- Specified by:
getScheduleParameters
in interfaceContextSchedulableDescriptor<T>
- Returns:
- parameters for the action's execution
-
setScheduleParameters
public void setScheduleParameters(ScheduleParameters scheduleParameters)
Sets the parameters for when the action should occur.- Specified by:
setScheduleParameters
in interfaceContextSchedulableDescriptor<T>
- Parameters:
scheduleParameters
- parameters for the action's execution
-
setMethodName
public void setMethodName(String methodName)
Sets the name of the method to call on the filtered objects.- Specified by:
setMethodName
in interfaceContextSchedulableDescriptor<T>
- Parameters:
methodName
- name of the method to call on the filtered objects.
-
getMethodName
public String getMethodName()
Retrieves the name of the method to call on the filtered objects.- Specified by:
getMethodName
in interfaceContextSchedulableDescriptor<T>
- Returns:
- name of the method to call on the filtered objects.
-
-