This post shows how to use the Iterator design pattern in Rust without using the Iterator trait or any crate. Suppose we have a struct with multiple collections of various types that implement the same trait. The Iterator Design Pattern
The Composite Design Pattern In Simple Words
The Composite design pattern helps us deal with a type of object – individually or as a group. In other words, our codes should be able to process that object alone. Also, our codes can deal with a collection of
The Singleton Design Pattern In Simple Words
Be mindful when creating objects; sometimes, we only need one of a specific type. Creating a single object that lives throughout the lifetime of a program is a form of Singleton design pattern. As simple as the concept may be,
The Decorator Design Pattern In Simple Words
The Decorator design pattern is an alternative to subclassing that makes our codes flexible and maintainable. Furthermore, it allows us to wrap around existing objects and dynamically modify their behaviors (methods). When To Use This Pattern? When do we use
Selection Sort Algorithm Implementation in Java
This article demonstrates how to implement Selection Sort algorithm in Java.
The Facade Design Pattern In Simple Words
Do you have codes with an overwhelming number of service and DAO methods? Which group of method calls represent which use case? If that is one of the predicaments you are having with your codebase, it is probably wise to
The Visitor Design Pattern In Simple Words
The Visitor design pattern is another behavioral pattern that simplifies access to an object’s data collections. Moreover, it is closely related to the Iterator design pattern. Unlike the Iterator pattern, the Visitor pattern makes client codes visit one data item
Maven – Redirect console output to file
Sometimes we need to redirect Maven console output to a file. Your favorite IDEs may not display all the console output. It is normal as some IDEs have a default configuration to show only the last part of the overall
Using @Conditional with @Configuration in Spring
Using @Conditional with @Configuration in Spring allows us to group @Bean objects loaded on a specific condition without resorting to using @Profile and too many @Bean/@Conditional. Requirements We used the following items for this post. Spring Boot 2.0.4.RELEASE JDK 8
The Iterator Design Pattern in Simple Words
The Iterator design pattern is a behavioral design pattern that simplifies access to an object’s data collections. Moreover, it aims to provide a simple mechanism to make the data available. As a result, the client codes do not need to