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 lists
U - 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>

public class TransformedNestedListBinding<T,U> extends AbstractNestedListBinding<T,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

    Constructors
    Constructor
    Description
    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.
  • Method Summary

    Modifier and Type
    Method
    Description
    protected U
    Computes the value of the binding by applying the transformer function to the source.

    Methods inherited from class javafx.beans.binding.ObjectBinding

    addListener, addListener, allowValidation, bind, get, getDependencies, invalidate, isObserved, isValid, onInvalidating, removeListener, removeListener, toString, unbind

    Methods inherited from class javafx.beans.binding.ObjectExpression

    asString, asString, asString, getValue, isEqualTo, isEqualTo, isNotEqualTo, isNotEqualTo, isNotNull, isNull, objectExpression

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    Methods inherited from interface javafx.beans.Observable

    subscribe

    Methods 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

      protected U 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:
      computeValue in class javafx.beans.binding.ObjectBinding<U>
      Returns:
      The computed value, as transformed from the nested list structure.