Timeline for Does the Composite design pattern implement recursive behavior?
Current License: CC BY-SA 3.0
6 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| May 15, 2014 at 12:45 | vote | accept | Aviv Cohn | ||
| Mar 23, 2014 at 19:56 | vote | accept | Aviv Cohn | ||
| Mar 25, 2014 at 17:13 | |||||
| Mar 23, 2014 at 19:19 | comment | added | Aviv Cohn | Are there any more ways recursion can exist? Or is it only a function-calling-itself or function-calls-identical-function-in-contained-object? | |
| Mar 23, 2014 at 19:18 | comment | added | Euphoric | @Prog Yeah, basically. I really recommend reading about trees. | |
| Mar 23, 2014 at 19:11 | comment | added | Aviv Cohn |
Let me see if I understand: 1- Any data structure (could be an object in OOP) that contains another data structure of the same type - thus implementing the same methods - is considered a Recursive Data Type. For example, an ArrayList containing ArrayLists is a Recursive Data Type, and an object of class ContainerThing that contains objects of type ContainerThing is also a Recursive Data Type. 2- Any method in a Recursive Data Type that calls the identical method in one of the Recursive Data Type's contained objects - is considered recursive. Are both of these correct?
|
|
| Mar 23, 2014 at 19:00 | history | answered | Euphoric | CC BY-SA 3.0 |