All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.machinezoo.noexception.optional.FallbackLongUnaryOperator Maven / Gradle / Ivy

There is a newer version: 1.9.1
Show newest version
// Part of NoException: https://noexception.machinezoo.com
package com.machinezoo.noexception.optional;

import java.util.function.*;
import lombok.*;

@RequiredArgsConstructor final class FallbackLongUnaryOperator implements LongUnaryOperator {
	private final OptionalLongUnaryOperator inner;
	private final LongSupplier source;
	@Override public long applyAsLong(long operand) {
		return inner.apply(operand).orElseGet(source);
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy