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

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

There is a newer version: 1.9.1
Show newest version
// Part of NoException: https://noexception.machinezoo.com
// Generated code. Edit generate.py instead.
package com.machinezoo.noexception.optional;

import java.util.function.*;

final class DefaultLongToIntFunction implements LongToIntFunction {
	private final OptionalLongToIntFunction inner;
	private final int result;
	public DefaultLongToIntFunction(OptionalLongToIntFunction inner, int result) {
		this.inner = inner;
		this.result = result;
	}
	@Override public int applyAsInt(long value) {
		return inner.apply(value).orElse(result);
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy