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

com.vaadin.server.SerializableFunction Maven / Gradle / Ivy

There is a newer version: 8.27.3
Show newest version
/*
 * Copyright (C) 2000-2024 Vaadin Ltd
 *
 * This program is available under Vaadin Commercial License and Service Terms.
 *
 * See  for the full
 * license.
 */
package com.vaadin.server;

import java.io.Serializable;
import java.util.function.Function;

/**
 * A {@link Function} that is also {@link Serializable}.
 *
 * @see Function
 * @author Vaadin Ltd
 * @since 8.0
 * @param 
 *            the type of the input to the function
 * @param 
 *            the type of the result of the function
 */
@FunctionalInterface
public interface SerializableFunction
        extends Function, Serializable {
    /**
     * Returns a function that always returns its input argument.
     *
     * @param 
     *            the type of the input and output objects to the function
     * @return a function that always returns its input argument
     */
    static  SerializableFunction identity() {
        return t -> t;
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy