Tuesday, September 29, 2020

Iterator

2 lượt xem comment 0 comments

Trade-offs are super interesting and excellent exercises you can do to have better design and better coding. Let's say we want to do some simple algorithms that return vols from a String. So how many different implementations can we have? So easily we can think about some sort of Utils or generic function that can do the work for us. What if we cant to be Lazy or Early loading or be able to abstract the process? Well and Iterator is an interesting pattern that we can use to help us to abstract state and have more functionality around the data structure. So because there is the Pattern Iterator you might think that there is just one possible implementation right? Actually, there are several different implementations we can do and we can play with different trade-offs. So today I made 2 java videos to co trought this pattern and show some practicality in code. I hope you guys like it, let's get started. 

The Videos

The Code

https://github.com/diegopacheco/java-pocs/tree/master/pocs/simple-iterator 

Cheers,

Diego Pacheco

Tags: no keyword

comment 0 comments

Chuyên mục văn hoá giải trí của VnExpress

.

© 2017 www.blogthuthuatwin10.com

Tầng 5, Tòa nhà FPT Cầu Giấy, phố Duy Tân, Phường Dịch Vọng Hậu, Quận Cầu Giấy, Hà Nội
Email: nguyenanhtuan2401@gmail.com
Điện thoại: 0908 562 750 ext 4548; Liên hệ quảng cáo: 4567.