Package org.opentrafficsim.water
Class SchedulableMethod
- java.lang.Object
-
- org.opentrafficsim.water.SchedulableMethod
-
- All Implemented Interfaces:
Serializable
public class SchedulableMethod extends Object implements Serializable
Copyright (c) 2013-2020 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.Based on software from the IDVV project, which is Copyright (c) 2013 Rijkswaterstaat - Dienst Water, Verkeer en Leefomgeving and licensed without restrictions to Delft University of Technology, including the right to sub-license sources and derived products to third parties.
$LastChangedDate: 2015-07-24 02:58:59 +0200 (Fri, 24 Jul 2015) $, @version $Revision: 1147 $, by $Author: averbraeck $, initial version Nov 6, 2016- Author:
- Alexander Verbraeck
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected Object[]
args
args are the arguments which are used to invoke the method with.protected String
method
method is the method which embodies the state change.protected Object
target
target reflects the target on which a state change is scheduled.
-
Constructor Summary
Constructors Constructor Description SchedulableMethod(Object target, String method, Object[] args)
The constructor of the schedulable method stores the object and method to invoke with its arguments.
-
-
-
Constructor Detail
-
SchedulableMethod
public SchedulableMethod(Object target, String method, Object[] args)
The constructor of the schedulable method stores the object and method to invoke with its arguments.- Parameters:
target
- Object; reflects the object on which the method must be invoked.method
- String; reflects the method to invokeargs
- Object[]; reflects the argumenst the method to invoke with
-
-
Method Detail
-
execute
public final void execute()
Executes the method. Method <init> means the constructor.
-
getArgs
public final Object[] getArgs()
- Returns:
- Returns the args.
-
getMethod
public final String getMethod()
- Returns:
- Returns the method.
-
getTarget
public final Object getTarget()
- Returns:
- Returns the target.
-
-