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

com.vaadin.data.ValueProvider 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.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); }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy