Code:
Imports System.Collections.Generic
Public Class Algorithm
Private algParts As List(Of Mutatable)
Public Sub New(ByVal algParts As List(Of Mutatable))
MyBase.New()
Me.algParts = algParts
End Sub
Public Function getAlgParts() As List(Of Mutatable)
Return algParts
End Function
Public Function getSize() As Integer
Return algParts.Count
End Function
Public Function clone() As Algorithm
Dim parts As New List(Of Mutatable)()
For Each absAlgPart As Mutatable In Me.algParts
parts.Add(absAlgPart.clone())
Next
Return New Algorithm(parts)
End Function
End Class