Lombok @Builder

1. Overview In this tutorial, we're going to look at the Lombok @Builder annotation to generate a builder for our class. It is a handy annotation especially when we're dealing…

Continue Reading

Lombok @NonNull

1. Overview It is important to include null checks into both generated and handwritten methods. In this tutorial, we'll look at the Lombok @NonNull annotation which helps us in this…

Continue Reading

Lombok @EqualsAndHashCode

1. Overview In this tutorial, we'll look at the Lombok @EqualsAndHashCode annotation to generate the equals and hashCode methods automatically. 2. Maven Dependency Let's first add the Lombok maven dependency: <dependency> <groupId>org.projectlombok</groupId> <artifactId>lombok</artifactId> <version>1.18.8</version> </dependency>…

Continue Reading

Lombok @ToString

1. Introduction In this tutorial, we'll look at the Lombok @ToString annotation to generate the toString method automatically. 2. Maven Dependency Let's first add the Lombok maven dependency: <dependency> <groupId>org.projectlombok</groupId> <artifactId>lombok</artifactId> <version>1.18.8</version> </dependency>…

Continue Reading
Close Menu