AbstractCollection
Short summary
An abstract class to implement the basic datastructure independend collection functionality for use in other Collections.
| Access | Abstract | Final | Extends | Implements |
|---|---|---|---|---|
| Yes | No | AbstractDisposableContainer | CNM_CollectionInterfaces.ICollection |
UML Diagram
Parameters
none
Properties
forEach
Type: CNM_CollectionInterfaces.IForEachStrategy
This property returns strategies to loop through the collection and apply actions to all objects contained.…
hasElement
Type: BOOL
This property returns TRUE if the collection has any element.…
isEmpty
Type: BOOL
This property returns TRUE if the collection is empty.…
size
Type: UDINT
This property returns the number of elements inside this collection.…
Methods
compareTo
- Parameters:
object(CNM_CollectionInterfaces.CNM_AbstractObject.IObject): the object to be compared to
- Return type: CNM_ReturnTypes.ComparationResult
This method compares a foreign object with the own one, this is needed for sort orders.…
containsEqualObject
- Parameters:
object(CNM_AbstractObject.IObject): the object to be checked if it exists inside the collection
- Return type:
BOOL
This method checks if a given object is contained in the collection. …
containsObject
- Parameters:
object(CNM_AbstractObject.IObject): the object to be checked if it exists inside the collection
- Return type:
BOOL
This method checks if a given object is contained in the collection. …
Abstract methods
clear
- Return type:
VOID
This method clears/deletes all clearable data from this object.…
createNewIterator
- Return type: CNM_ReturnTypes.SingleExecutionResult
This method returns a NEW Iterator instance which can iterate the collection.…
iterate
- Parameters:
execute(BOOL): Indicates if the iteration should be executed or resetted
- Return type: CNM_ReturnTypes.SingleExecutionState
This method returns the next object in the iteration and returns an execution state.…
Code
Declaration
FUNCTION_BLOCK ABSTRACT AbstractCollection EXTENDS AbstractDisposableContainer IMPLEMENTS CNM_CollectionInterfaces.ICollection
VAR
(*the amount of objects in the collection*)
collectionSize :UDINT;
(*counter that increases on every collection change*)
changesToCollection :__XWORD;
END_VAR
VAR_STAT
collectionFactory :CollectionFactory();
END_VAR