Uses of Interface
com.vaadin.flow.function.SerializableFunction
Package
Description
-
Uses of SerializableFunction in com.vaadin.collaborationengine
Modifier and TypeMethodDescriptionCollaborationMessagePersister.fromCallbacks
(SerializableFunction<CollaborationMessagePersister.FetchQuery, Stream<CollaborationMessage>> fetchCallback, SerializableConsumer<CollaborationMessagePersister.PersistRequest> persistCallback) Creates an instance ofCollaborationMessagePersister
from the provided callbacks.protected void
AbstractCollaborationManager.openTopicConnection
(ConnectionContext context, SerializableFunction<TopicConnection, Registration> connectionActivationCallback) Opens a connection to the topic of this manager using the provided context and activation callback.CollaborationEngine.openTopicConnection
(ConnectionContext context, String topicId, UserInfo localUser, SerializableFunction<TopicConnection, Registration> connectionActivationCallback) Opens a connection to the collaboration topic with the provided id based on a generic context definition.CollaborationEngine.openTopicConnection
(Component component, String topicId, UserInfo localUser, SerializableFunction<TopicConnection, Registration> connectionActivationCallback) Opens a connection to the collaboration topic with the provided id based on a component instance.<T> void
CollaborationBinder.setSerializer
(Class<T> type, SerializableFunction<T, String> serializer, SerializableFunction<String, T> deserializer) Sets a custom serializer and deserializer to use for a specific value type. -
Uses of SerializableFunction in com.vaadin.flow.component
Modifier and TypeInterfaceDescriptioninterface
ItemLabelGenerator
can be used to customize the string shown to the user for an item.ModifierConstructorDescriptionAbstractSinglePropertyField
(String propertyName, T defaultValue, Class<P> elementPropertyType, SerializableFunction<P, T> presentationToModel, SerializableFunction<T, P> modelToPresentation) Creates a new field that uses a property value with the given stateless converters for producing a model value. -
Uses of SerializableFunction in com.vaadin.flow.component.charts.model
Modifier and TypeMethodDescriptionvoid
DataProviderSeries.setClose
(SerializableFunction<T, Object> callBack) Sets the function used for retrievingclose
values from the bean provided by the data provider.void
DataProviderSeries.setHigh
(SerializableFunction<T, Object> callBack) Sets the function used for retrievinghigh
values from the bean provided by the data provider.void
DataProviderSeries.setLow
(SerializableFunction<T, Object> callBack) Sets the function used for retrievinglow
values from the bean provided by the data provider.void
DataProviderSeries.setOpen
(SerializableFunction<T, Object> callBack) Sets the function used for retrievingopen
values from the bean provided by the data provider.void
DataProviderSeries.setPointName
(SerializableFunction<T, Object> callBack) Sets the function used for retrievingname
values from the bean provided by the data provider.void
DataProviderSeries.setProperty
(String propertyName, SerializableFunction<T, Object> callBack) Sets the function used for retrieving the value for the given property name from the given data provider.void
DataProviderSeries.setX
(SerializableFunction<T, Object> callBack) Sets the function used for retrievingx
values from the bean provided by the data provider.void
DataProviderSeries.setY
(SerializableFunction<T, Object> callBack) Sets the function used for retrievingy
values from the bean provided by the data provider.ModifierConstructorDescriptionDataProviderSeries
(DataProvider<T, ?> dataProvider, SerializableFunction<T, Object> callBack) Creates a new series using data from the given data provider and y values. -
Uses of SerializableFunction in com.vaadin.flow.component.combobox
Modifier and TypeMethodDescriptionComboBoxBase.setItems
(InMemoryDataProvider<TItem> inMemoryDataProvider, SerializableFunction<String, SerializablePredicate<TItem>> filterConverter) Sets an in-memory data provider for the combo box to use, taking into account both in-memory filtering from data provider and combo box's text filter.ComboBoxBase.setItemsWithFilterConverter
(CallbackDataProvider.FetchCallback<TItem, C> fetchCallback, CallbackDataProvider.CountCallback<TItem, C> countCallback, SerializableFunction<String, C> filterConverter) Supply items lazily with callbacks: the first one fetches the items based on offset, limit and an optional filter, the second provides the exact count of items in the backend.ComboBoxBase.setItemsWithFilterConverter
(CallbackDataProvider.FetchCallback<TItem, C> fetchCallback, SerializableFunction<String, C> filterConverter) Supply items lazily with a callback from a backend, using custom filter type. -
Uses of SerializableFunction in com.vaadin.flow.component.grid
Modifier and TypeInterfaceDescriptioninterface
Generates the sort orders when rows are sorted by a column.Modifier and TypeMethodDescriptionGrid.Column.getClassNameGenerator()
Gets the function that is used for generating CSS class names for cells in this column.Grid.getClassNameGenerator()
Gets the function that is used for generating CSS class names for rows in this grid.Grid.Column.getPartNameGenerator()
Gets the function that is used for generating CSS part names for cells in this column.Grid.getPartNameGenerator()
Gets the function that is used for generating CSS part names for rows in this grid.Grid.Column.getTooltipGenerator()
Modifier and TypeMethodDescriptionGrid.Column.setClassNameGenerator
(SerializableFunction<T, String> classNameGenerator) Sets the function that is used for generating CSS class names for cells in this column.void
Grid.setClassNameGenerator
(SerializableFunction<T, String> classNameGenerator) Sets the function that is used for generating CSS class names for all the cells in the rows in this grid.void
Grid.setDragDataGenerator
(String type, SerializableFunction<T, String> dragDataGenerator) Sets a generator function for customizing drag data.Grid.Column.setEditorComponent
(SerializableFunction<T, ? extends Component> componentCallback) Sets a function that returns the editor component to be used for an specific item in the editor row.Grid.Column.setPartNameGenerator
(SerializableFunction<T, String> partNameGenerator) Sets the function that is used for generating CSS part names for cells in this column.void
Grid.setPartNameGenerator
(SerializableFunction<T, String> partNameGenerator) Sets the function that is used for generating CSS part names for all the cells in the rows in this grid.Grid.Column.setTooltipGenerator
(SerializableFunction<T, String> tooltipGenerator) Sets the function that is used for generating tooltip text for cells in this column.void
Grid.setTooltipGenerator
(SerializableFunction<T, String> tooltipGenerator) Sets the function that is used for generating tooltip text for all cells in this grid. -
Uses of SerializableFunction in com.vaadin.flow.component.grid.editor
Modifier and TypeMethodDescriptionvoid
EditorRenderer.setComponentFunction
(SerializableFunction<T, ? extends Component> componentFunction) Sets the function that creates components to be used as editors for the column. -
Uses of SerializableFunction in com.vaadin.flow.component.gridpro
Modifier and TypeMethodDescription<E extends Enum<E>>
Grid.Column<T>EditColumnConfigurator.select
(ItemUpdater<T, E> itemUpdater, Class<E> enumType, SerializableFunction<E, String> getStringRepresentation) Configures the column to have a select editor with the given item updater, enum type and string representation callback. -
Uses of SerializableFunction in com.vaadin.flow.component.internal
ModifierConstructorDescriptionDependencyTreeCache
(SerializableFunction<T, Collection<T>> dependencyParser) Creates a dependency cache with the given dependency parser. -
Uses of SerializableFunction in com.vaadin.flow.component.textfield
ModifierConstructorDescriptionAbstractNumberField
(SerializableFunction<String, T> parser, SerializableFunction<T, String> formatter, double absoluteMin, double absoluteMax) Sets up the common logic for number fields. -
Uses of SerializableFunction in com.vaadin.flow.data.binder
Modifier and TypeInterfaceDescriptioninterface
Provider interface for generating localizable error messages usingValueContext
.Modifier and TypeMethodDescription<S> Result<S>
Result.flatMap
(SerializableFunction<R, Result<S>> mapper) If this Result has a value, applies the given Result-returning function to the value.Result.getOrThrow
(SerializableFunction<String, ? extends X> exceptionProvider) Return the value, if the result denotes success, otherwise throw an exception to be created by the provided supplier.default <S> Result<S>
Result.map
(SerializableFunction<R, S> mapper) If this Result has a value, returns a Result of applying the given function to the value.static <R> Result<R>
Result.of
(SerializableSupplier<R> supplier, SerializableFunction<Exception, String> onError) Returns a Result representing the result of invoking the given supplier.<C> void
HasFilterableDataProvider.setDataProvider
(DataProvider<T, C> dataProvider, SerializableFunction<F, C> filterConverter) Sets the data provider and filter converter for this listing.default <NEWTARGET>
Binder.BindingBuilder<BEAN,NEWTARGET> Binder.BindingBuilder.withConverter
(SerializableFunction<TARGET, NEWTARGET> toModel, SerializableFunction<NEWTARGET, TARGET> toPresentation) Maps the binding to another data type using the mapping functions and a possible exception as the error message.default <NEWTARGET>
Binder.BindingBuilder<BEAN,NEWTARGET> Binder.BindingBuilder.withConverter
(SerializableFunction<TARGET, NEWTARGET> toModel, SerializableFunction<NEWTARGET, TARGET> toPresentation, String errorMessage) Maps the binding to another data type using the mapping functions and the given error error message if a value cannot be converted to the new target type. -
Uses of SerializableFunction in com.vaadin.flow.data.converter
Modifier and TypeMethodDescriptionstatic <P,
M> Converter<P, M> Converter.from
(SerializableFunction<P, Result<M>> toModel, SerializableFunction<M, P> toPresentation) Constructs a converter from a filter and a function.static <P,
M> Converter<P, M> Converter.from
(SerializableFunction<P, M> toModel, SerializableFunction<M, P> toPresentation, SerializableFunction<Exception, String> onError) Constructs a converter from two functions. -
Uses of SerializableFunction in com.vaadin.flow.data.provider
Modifier and TypeInterfaceDescriptioninterface
A callback interface that is used to provide the identifier of an item.Modifier and TypeMethodDescriptionstatic <T,
C, F> F FilterUtils.convertFilter
(SerializableFunction<C, F> filterConverter, Query<T, C> query) Gets the filter converted from a query filter by thefilterConverter
.default <C> DataProvider<T,
C> DataProvider.withConvertedFilter
(SerializableFunction<C, F> filterConverter) Wraps this data provider to create a data provider that uses a different filter type. -
Uses of SerializableFunction in com.vaadin.flow.data.provider.hierarchy
Modifier and TypeMethodDescription<C> HierarchicalDataProvider<T,
C> AbstractHierarchicalDataProvider.withConvertedFilter
(SerializableFunction<C, F> filterConverter) default <C> HierarchicalDataProvider<T,
C> HierarchicalDataProvider.withConvertedFilter
(SerializableFunction<C, F> filterConverter) ModifierConstructorDescriptionHierarchicalCommunicationController
(String parentKey, DataKeyMapper<T> keyMapper, HierarchyMapper<T, ?> mapper, DataGenerator<T> dataGenerator, SerializableFunction<Integer, HierarchicalArrayUpdater.HierarchicalUpdate> startUpdate, SerializableBiFunction<String, Range, Stream<T>> fetchItems) Constructs communication controller with support for hierarchical data structure. -
Uses of SerializableFunction in com.vaadin.flow.data.renderer
ModifierConstructorDescriptionComponentRenderer
(SerializableFunction<SOURCE, COMPONENT> componentFunction) Creates a new ComponentRenderer that uses the componentFunction to generate newComponent
instances.ComponentRenderer
(SerializableFunction<SOURCE, COMPONENT> componentFunction, SerializableBiFunction<Component, SOURCE, Component> componentUpdateFunction) IconRenderer
(SerializableFunction<ITEM, ? extends Component> iconGenerator) Creates a new renderer instance using the defaultItemLabelGenerator
:String::valueOf
and the providediconGenerator
.IconRenderer
(SerializableFunction<ITEM, ? extends Component> iconGenerator, ItemLabelGenerator<ITEM> itemLabelGenerator) Creates a new renderer instance using the providediconGenerator
anditemLabelGenerator
. -
Uses of SerializableFunction in com.vaadin.flow.function
Modifier and TypeInterfaceDescriptioninterface
ValueProvider<SOURCE,
TARGET> A callback interface for providing values from a given source.Modifier and TypeMethodDescriptionstatic <T> SerializableFunction<T,
T> SerializableFunction.identity()
Returns a function that always returns its input argument. -
Uses of SerializableFunction in com.vaadin.flow.internal
ModifierConstructorDescriptionReflectionCache
(SerializableFunction<Class<C>, T> valueProvider) Creates a new reflection cache with the given value provider. -
Uses of SerializableFunction in com.vaadin.flow.server.communication
Modifier and TypeInterfaceDescriptioninterface
Factory that produces instances ofPushConnection
. -
Uses of SerializableFunction in com.vaadin.flow.server.webcomponent
Modifier and TypeClassDescriptionfinal class
Retrieves web component tag from aWebComponentExporterFactory
object.