| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
parent directory.. | ||||
| layout | pattern | ||||
|---|---|---|---|---|---|
| title | Trampoline | ||||
| folder | trampoline | ||||
| permalink | /patterns/trampoline/ | ||||
| categories | Behavior | ||||
| tags |
|
Trampoline pattern is used for implementing algorithms recursively in Java without blowing the stack and to interleave the execution of functions without hard coding them together It is possible by representing a computation in one of 2 states : done | more (completed with result, or a reference to the reminder of the computation, something like the way a java.util.Supplier does).
Trampoline pattern allows to define recursive algorithms by iterative loop.
Use the Trampoline pattern when
| Back | FazBrowse Home | New Git URL |