Methods
General
Operations are used in UML diagrams to specify the behavior of a class. Please note that while the UML specification treats operations and methods (the actual implementations of an operation) differently, UMLBoard - to keep things simple - makes no distinction between the two terms. Operations (or methods) in UMLBoard contain the following elements: The operation's name, a list of parameters, and the return type.
To determine the uniqueness of an operation, UMLBoard only considers its name and the number and order of its parameter types. Therefore, the following two operations would be considered equal, albeit having divergent parameter names:
// both methods will be considered equal as the parameter names
// are not considered as part of the signature by UMLBoard.
change(firstName: string): void;
change(lastName: string): void;
You can, however change this rule in the settings, allowing your class to contain two methods with the same signature.
One way to avoid confusion here could be using more specific operation names.
Creating and Editing
Editing an operation/method works essentially the same way as editing properties. Pressing Tab in an input field moves the cursor to the following input while pressing Enter confirms the current changes and immediately moves the cursor to the method's return value. Pressing Enter again completes the entry.
Note that if you're editing the last parameter type, pressing Tab will immediately create a new parameter and place the cursor on its name.
When creating new methods, however, there is a significant difference compared to properties: While a new property is added immediately to a class, methods are only added after the entire input has been completed by pressing the Enter key on the method's return type. If you cancel editing earlier with Esc, your newly created operation will not be added to your class.
Methods and their parameters also track changes to other classes when referenced. So whenever you delete a class that is the return type of a method, the corresponding method will automatically be deleted. The same also holds for all parameters with the same type.
Abstract Methods
1.13
Methods can be defined as abstract (or pure virtual for C++ developers), meaning that such methods don't have any implementation and must instead be implemented by derived classes. You can use the action-wheel menu to change the state of a method to abstract and back to regular implementation.
Abstract methods are rendered in italics. Please note that as soon as a method is abstract, the containing class will automatically be marked as abstract, meaning that the class can no longer be instantiated.
You can even declare a method as abstract during creation: When typing the method name, start with a v (i.e., pure virtual) followed by a space and the method name. After pressing Enter, the method will automatically be declared as abstract.