Package com.vaadin.flow.function
Interface ValueProvider<SOURCE,TARGET>
-
- Type Parameters:
SOURCE
- the type of the object used to provide the valueTARGET
- the type of the provided value
- All Superinterfaces:
Function<SOURCE,TARGET>
,Serializable
,SerializableFunction<SOURCE,TARGET>
- All Known Subinterfaces:
IdentifierProvider<T>
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface public interface ValueProvider<SOURCE,TARGET> extends SerializableFunction<SOURCE,TARGET>
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.
- Since:
- 1.0.
- Author:
- Vaadin Ltd
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description TARGET
apply(SOURCE source)
Provides a value from the given source object.static <T> ValueProvider<T,T>
identity()
Returns a value provider that always returns its input argument.
-
-
-
Method Detail
-
identity
static <T> ValueProvider<T,T> identity()
Returns a value provider that always returns its input argument.- Type Parameters:
T
- the type of the input and output objects to the function- Returns:
- a function that always returns its input argument
-
-