allows the user to add Java interfaces to a model.
Please refer to Interfaces
section of Java online tutorials for more information on Java
add a Java interface
- In the Projects view,
right-click (Mac OS: Ctrl+click) the model item you are currently
working with, and
choose New > Java
Interface… from the popup menu.
- The New
Java Interface dialog box is displayed.
- Specify the name of the
new Java interface in the Name
field and click Finish
to complete the process.
- You will see Java editor opened prompting you to write Java
code for the just defined interface.
To use an interface, you write a class that implements the
interface. When an instantiable class implements an interface, it
method body for each of the methods declared in the interface.
make agent class implementing an interface
- Select the agent type in the Projects
- In the Advanced Java
section of the Properties
view, type the interface name in the Implements (comma-separated list of
make Java class implementing an interface
- Double-click the Java class in the Projects view to open its code in
the Java editor.
- Complete the first code line containing the class name with the