Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
/*
* 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.data;
import com.vaadin.server.SerializableFunction;
/**
* A callback interface for providing values from a given source.
*
* For example this interface can be implemented to simply extract a value with
* a getter, or to create a composite value based on the fields of the source
* object.
*
* @author Vaadin Ltd.
* @since 8.0
*
* @param
* the type of the object used to provide the value
* @param
* the type of the provided value
*/
@FunctionalInterface
public interface ValueProvider
extends SerializableFunction {
/**
* Returns a value provider 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
*/
public static ValueProvider identity() {
return t -> t;
}
/**
* Provides a value from the given source object.
*
* @param source
* the source to retrieve the value from
* @return the value provided by the source
*/
@Override
public TARGET apply(SOURCE source);
}