
com.machinezoo.noexception.optional.DefaultBiFunction Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of noexception Show documentation
Show all versions of noexception Show documentation
Makes exception handling concise and beautiful, yet architecturally clean and flexible.
// Part of NoException: https://noexception.machinezoo.com
// Generated code. Edit generate.py instead.
package com.machinezoo.noexception.optional;
import java.util.function.*;
final class DefaultBiFunction implements BiFunction {
private final OptionalBiFunction inner;
private final R result;
public DefaultBiFunction(OptionalBiFunction inner, R result) {
this.inner = inner;
this.result = result;
}
@Override public R apply(T t, U u) {
return inner.apply(t, u).orElse(result);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy