Class TransformedFlattenedNestedListStreamBinding<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.TransformedFlattenedNestedListStreamBinding<T,U>
Type Parameters:
T - the type of elements within the nested lists
U - the type of the output produced by the transformation function
All Implemented Interfaces:
javafx.beans.binding.Binding<U>, javafx.beans.Observable, javafx.beans.value.ObservableObjectValue<U>, javafx.beans.value.ObservableValue<U>

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

    Fields inherited from class AbstractNestedListBinding

    source
  • Constructor Summary

    Constructors
    Constructor
    Description
    TransformedFlattenedNestedListStreamBinding(javafx.collections.ObservableList<javafx.collections.ObservableList<T>> source, Function<Stream<T>, U> transformer)
    Constructs a new TransformedNestedListBinding with the specified source of nested observable lists and a transformation function.
  • Method Summary

    Modifier and Type
    Method
    Description
    protected U
    Computes the transformed value by applying the transformation function to the flattened source stream.

    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

    • TransformedFlattenedNestedListStreamBinding

      public TransformedFlattenedNestedListStreamBinding(javafx.collections.ObservableList<javafx.collections.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 - the observable list of observable lists that serves as the source for this binding
      transformer - a function that takes a flattened stream of elements of type T and returns a transformed value of type U
  • Method Details

    • computeValue

      protected U computeValue()
      Computes the transformed value by applying the transformation function to the flattened source stream.
      Specified by:
      computeValue in class javafx.beans.binding.ObjectBinding<U>
      Returns:
      the transformed value of type U, as derived from the flattened nested lists