org.jtwig.reflection.util.Optionals Maven / Gradle / Ivy
package org.jtwig.reflection.util;
import com.google.common.base.Optional;
import com.google.common.base.Supplier;
public final class Optionals {
private Optionals () {}
public static Optional orOptionalSupplier (Optional input, Supplier> supplier) {
if (!input.isPresent()) {
return supplier.get();
} else {
return input;
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy