Closed etiennelndr closed 6 years ago
This pull request adds a new function in the interface ElementList. This function allows to retrieve an element in a list. Here is the new interface:
type ElementList interface { Composite Size() int GetElementAt(i int) Element }
It required to implement this function for each element that extends ElementList. Here is an example for the type DurationList:
func (list *DurationList) GetElementAt(i int) Element { if list != nil { if i <= list.Size() { return (*list)[i] } return nil } return nil }
This pull request adds a new function in the interface ElementList. This function allows to retrieve an element in a list. Here is the new interface:
It required to implement this function for each element that extends ElementList. Here is an example for the type DurationList: