Top Description Fields Constructors Methods
com.dlsc.gemsfx.binding

public Class TransformedFlattenedNestedListStreamBinding<T, U>

extends AbstractNestedListBinding<T, U>
Class Inheritance
Type Parameters
<T>
the type of elements within the nested lists
<U>
the type of the output produced by the transformation function
Imports
javafx.collections.ObservableList, java.util.Objects, java.util.function.Function, java.util.stream.Stream

Binds a nested structure of ObservableList<ObservableList<T>> to a transformed output U. This class takes a nested list and applies a transformation function to a flattened version of that list, producing a result of type U. This is useful for performing complex transformations on nested data structures in a declarative way.

Field Summary

Modifier and TypeField and Description
private final Function<Stream<T>, U>
Inherited from com.dlsc.gemsfx.binding.AbstractNestedListBinding:
source

Constructor Summary

AccessConstructor and Description
public
TransformedFlattenedNestedListStreamBinding(ObservableList<ObservableList<T>>
the observable list of observable lists that serves as the source for this binding
source
,
Function<Stream<T>, U>
a function that takes a flattened stream of elements of type T and returns a transformed value of type U
transformer
)

Constructs a new TransformedNestedListBinding with the specified source of nested observable lists and a transformation function.

Method Summary

Modifier and TypeMethod and Description
protected U

Returns:

the transformed value of type U, as derived from the flattened nested lists
computeValue
()

Implements abstract javafx.beans.binding.ObjectBinding.computeValue.

Computes the transformed value by applying the transformation function to the flattened source stream.

Inherited from com.dlsc.gemsfx.binding.AbstractNestedListBinding:
disposeflattenSourceinitListeners

Field Detail

transformerback to summary
private final Function<Stream<T>, U> transformer

Constructor Detail

TransformedFlattenedNestedListStreamBindingback to summary
public TransformedFlattenedNestedListStreamBinding(ObservableList<ObservableList<T>> source, Function<Stream<T>, U> transformer)

Constructs a new TransformedNestedListBinding with the specified source of nested observable lists and a transformation function. The function will be applied to a flattened stream of the nested lists, allowing for the transformation of nested list elements into a single output value of type U.

Parameters
source:ObservableList<ObservableList<T>>

the observable list of observable lists that serves as the source for this binding

transformer:Function<Stream<T>, U>

a function that takes a flattened stream of elements of type T and returns a transformed value of type U

Method Detail

computeValueback to summary
protected U computeValue()

Implements abstract javafx.beans.binding.ObjectBinding.computeValue.

Computes the transformed value by applying the transformation function to the flattened source stream.

Returns:U

the transformed value of type U, as derived from the flattened nested lists

Annotations
@Override