Notes for the readers:
- The code has been written using IntelliJ
- All public method parameters should be considered by default non-null by the reader. It is much more readable to make this decision instead of annotating all public class contracts with some @NotNull annotation. The code performs the necessary validations but the convention of the public APIs is as described for readability purposes.
- All public methods & classes are documented.
- Unit tests can be also found in the project.
- To Run the project, it can be imported as an IDEA Java 11 Maven project.
- Entry point of the code Main.java