Skip to content

Instantly share code, notes, and snippets.

View 3DRaven's full-sized avatar
🏠
Working from home

Renat Eskenin 3DRaven

🏠
Working from home
  • Prague
View GitHub Profile
@3DRaven
3DRaven / example.java
Last active March 9, 2023 13:24
Java Builder with compile time checking of full initialization (Strict Builder pattern)
public class Person {
private final String username;
private final int age;
Person(PersonBuilder personBuilder) {
this.username = personBuilder.username;
this.age = personBuilder.age;
}