setNodeComparator
Short summary
Sets a comparator, that is used to compare two nodes of this tree. Optional, if not set, object.compareTo will be used.
Attention: The comparator can only be set if the tree has at most one element.
Attention: Will be deep destructed within the deep destruct context of this class.
Return: SUCCESS: new comparator was set
ABORTED: tree already contained more than one object
- Return type: CNM_ReturnTypes.SingleExecutionResult
Parameters
| Name | Type | Comment | Kind |
|---|---|---|---|
| nodeComparator | CNM_AbstractObject.IComparator | the comparator that should be used to compare two nodes | input |
Code
Declaration
METHOD setNodeComparator :CNM_ReturnTypes.SingleExecutionResult
VAR_INPUT
(*the comparator that should be used to compare two nodes*)
nodeComparator :CNM_AbstractObject.IComparator;
END_VAR