Skip to main content

containsEqualObject

Short summary

True if the tree contains any object where either the injected comparator or, if no comparator is used, the object.compareTo result is equal.

Attention: The objects can be different as long as comparesTo says they are equal, the hashcode is not considered. To check for same Object, use containsObject

Return: TRUE if an object is found for that .compareTo is equal, FALSE otherwise

  • Return type: BOOL

Parameters

NameTypeCommentKind
objectCNM_AbstractObject.IObjectthe object to be checked if an object with equal value exists inside the collectioninput

Code

Declaration

METHOD containsEqualObject :BOOL
VAR_INPUT
(*the object to be checked if an object with equal value exists inside the collection*)
object :CNM_AbstractObject.IObject;
END_VAR

Implementation

containsEqualObject := THIS^.getEqualObject(object);