T- Data type of element stored in this Visitable
public interface Visitable<T>
|Modifier and Type||Method and Description|
The provided function is executed with the value stored in this Visitable if one is present, otherwise the provided Supplier is executed instead.
<R> R visit(java.util.function.Function<? super T,? extends R> present, java.util.function.Supplier<? extends R> absent)
present- Function to execute if this Visitable has a value
absent- Supplier to execute if this Visitable does not have a Value