Class TransformedNestedListBinding<T,U>
java.lang.Object
javafx.beans.binding.ObjectExpression<U>
javafx.beans.binding.ObjectBinding<U>
com.dlsc.gemsfx.binding.AbstractNestedListBinding<T,U>
com.dlsc.gemsfx.binding.TransformedNestedListBinding<T,U>
- Type Parameters:
T- the type of the elements in the nested observable listsU- the type of the value computed by the binding
- All Implemented Interfaces:
javafx.beans.binding.Binding<U>, javafx.beans.Observable, javafx.beans.value.ObservableObjectValue<U>, javafx.beans.value.ObservableValue<U>
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
Fields inherited from class AbstractNestedListBinding
source -
Constructor Summary
ConstructorsConstructorDescriptionTransformedNestedListBinding(javafx.collections.ObservableList<javafx.collections.ObservableList<T>> source, Function<javafx.collections.ObservableList<javafx.collections.ObservableList<T>>, U> transformer) Constructs a NestedListBinding with a source and a transformer function. -
Method Summary
Modifier and TypeMethodDescriptionprotected UComputes the value of the binding by applying the transformer function to the source.Methods inherited from class AbstractNestedListBinding
dispose, flattenSource, initListenersMethods inherited from class javafx.beans.binding.ObjectBinding
addListener, addListener, allowValidation, bind, get, getDependencies, invalidate, isObserved, isValid, onInvalidating, removeListener, removeListener, toString, unbindMethods inherited from class javafx.beans.binding.ObjectExpression
asString, asString, asString, getValue, isEqualTo, isEqualTo, isNotEqualTo, isNotEqualTo, isNotNull, isNull, objectExpressionMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface javafx.beans.Observable
subscribeMethods inherited from interface javafx.beans.value.ObservableValue
flatMap, getValue, map, orElse, subscribe, subscribe, when
-
Constructor Details
-
TransformedNestedListBinding
public TransformedNestedListBinding(javafx.collections.ObservableList<javafx.collections.ObservableList<T>> source, Function<javafx.collections.ObservableList<javafx.collections.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- The observable list of observable lists that serves as the source for this binding.transformer- A function that transforms the source into a computed value of type U.
-
-
Method Details
-
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.- Specified by:
computeValuein classjavafx.beans.binding.ObjectBinding<U>- Returns:
- The computed value, as transformed from the nested list structure.
-