java.lang.Object
javafx.beans.binding.ObjectExpression<T>
javafx.beans.binding.ObjectBinding<T>
com.iamsoft.util.ui.javafx.collections.reduction.MedianBinding<T>
Type Parameters:
T - Type of element in list.
All Implemented Interfaces:
javafx.beans.binding.Binding<T>, javafx.beans.Observable, javafx.beans.value.ObservableObjectValue<T>, javafx.beans.value.ObservableValue<T>

public class MedianBinding<T> extends javafx.beans.binding.ObjectBinding<T>
See Also:
  • Constructor Summary

    Constructors
    Constructor
    Description
    MedianBinding(javafx.collections.ObservableList<? extends T> pList, BinaryOperator<T> pAddFunction, BiFunction<T,Integer,? extends T> pDivideFunction)
     
    MedianBinding(javafx.collections.ObservableList<? extends T> pList, BinaryOperator<T> pAddFunction, BiFunction<T,Integer,? extends T> pDivideFunction, Comparator<? super T> pComparator)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected T
     
    static <T> T
    computeValue(List<? extends T> pList, BinaryOperator<T> pAddFunction, BiFunction<T,Integer,? extends T> pDivideFunction, Comparator<? super T> pComparator)
     

    Methods inherited from class javafx.beans.binding.ObjectBinding

    addListener, addListener, allowValidation, bind, dispose, 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 java.lang.Object

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

    Methods inherited from interface javafx.beans.value.ObservableValue

    flatMap, getValue, map, orElse, when
  • Constructor Details

    • MedianBinding

      public MedianBinding(javafx.collections.ObservableList<? extends T> pList, BinaryOperator<T> pAddFunction, BiFunction<T,Integer,? extends T> pDivideFunction)
    • MedianBinding

      public MedianBinding(javafx.collections.ObservableList<? extends T> pList, BinaryOperator<T> pAddFunction, BiFunction<T,Integer,? extends T> pDivideFunction, Comparator<? super T> pComparator)
      Parameters:
      pComparator - Comparator for sorting list or null if list is pre-sorted.
  • Method Details

    • computeValue

      protected T computeValue()
      Specified by:
      computeValue in class javafx.beans.binding.ObjectBinding<T>
    • computeValue

      public static <T> T computeValue(List<? extends T> pList, BinaryOperator<T> pAddFunction, BiFunction<T,Integer,? extends T> pDivideFunction, Comparator<? super T> pComparator)