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

org.dbflute.optional.OptionalThingFunction Maven / Gradle / Ivy

There is a newer version: 1.2.8
Show newest version
/*
 * Copyright 2014-2019 the original author or authors.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
 * either express or implied. See the License for the specific language
 * governing permissions and limitations under the License.
 */
package org.dbflute.optional;

/**
 * The function of optional thing.
 * 
 * entityOpt.map(member -> {
 *     // called if value exists, not called if not present
 *     return new MemberWebBean(member);
 * }).ifPresent(...);
 * 
* @param The type of wrapped object in optional thing. * @param The type of result of mapping. * @author jflute * @since 1.0.5F (2014/05/10 Saturday) */ @FunctionalInterface public interface OptionalThingFunction { /** * Apply the object in the optional thing. * @param obj The wrapped object in the optional thing. (NotNull) * @return The result of mapping. (NullAllowed: if null, map() returns empty optional thing) */ RESULT apply(OBJ obj); }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy