ifPresentOrElseConsumer
The ifPresentOrElseConsumer method is a functional interface provided in Java's Optional class. It allows for handling both the presence and absence of an optional value in a concise manner. This method takes two arguments: a Consumer that will be executed if the Optional contains a value, and a Runnable that will be executed if the Optional is empty.
The purpose of ifPresentOrElseConsumer is to avoid verbose if-else statements when dealing with Optional objects. Instead
This method is particularly useful for scenarios where you need to either process a value if it