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

public Class TransformedNestedListBinding<T, U>

extends AbstractNestedListBinding<T, U>
Class Inheritance
Type Parameters
<T>
the type of the elements in the nested observable lists
<U>
the type of the value computed by the binding
Imports
javafx.collections.ObservableList, java.util.Objects, java.util.function.Function

A concrete implementation of AbstractNestedListBinding that computes its value using a function that directly applies to the source list of lists. This class maintains the nested list structure in its computation.

Field Summary

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

Constructor Summary

AccessConstructor and Description
public
TransformedNestedListBinding(ObservableList<ObservableList<T>>
The observable list of observable lists that serves as the source for this binding.
source
,
Function<ObservableList<ObservableList<T>>, U>
A function that transforms the source into a computed value of type U.
transformer
)

Constructs a NestedListBinding with a source and a transformer function.

Method Summary

Modifier and TypeMethod and Description
protected U

Returns:

The computed value, as transformed from the nested list structure.
computeValue
()

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

Computes the value of the binding by applying the transformer function to the source.

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

Field Detail

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

Constructor Detail

TransformedNestedListBindingback to summary
public TransformedNestedListBinding(ObservableList<ObservableList<T>> source, Function<ObservableList<ObservableList<T>>, U> transformer)

Constructs a NestedListBinding with a source and a transformer function. The transformer function is applied directly to the nested list structure to compute the value.

Parameters
source:ObservableList<ObservableList<T>>

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

transformer:Function<ObservableList<ObservableList<T>>, U>

A function that transforms the source into a computed value of type U.

Method Detail

computeValueback to summary
protected U computeValue()

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

Computes the value of the binding by applying the transformer function to the source. This method directly reflects changes in the nested list structure in the computed value.

Returns:U

The computed value, as transformed from the nested list structure.

Annotations
@Override