Class MeanBinding<T>

  • Type Parameters:
    T - Item type.
    All Implemented Interfaces:
    javafx.beans.binding.Binding<T>, javafx.beans.Observable, javafx.beans.value.ObservableObjectValue<T>, javafx.beans.value.ObservableValue<T>

    public class MeanBinding<T>
    extends javafx.beans.binding.ObjectBinding<T>
    Averages items in a list.
    See Also:
    Mean
    • Constructor Summary

      Constructors 
      Constructor Description
      MeanBinding​(javafx.collections.ObservableList<? extends T> pList, BinaryOperator<T> pAddFunction, BiFunction<T,​Integer,​? extends T> pDivideFunction)
      Fully recalculate after each change.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected T computeValue()  
      static <T> T computeValue​(Collection<? extends T> pCollection, BinaryOperator<T> pAddFunction, BiFunction<T,​Integer,​? extends T> pDivideFunction)  
      • Methods inherited from class javafx.beans.binding.ObjectBinding

        addListener, addListener, bind, dispose, get, getDependencies, invalidate, 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 interface javafx.beans.value.ObservableValue

        getValue
    • Constructor Detail

      • MeanBinding

        public MeanBinding​(javafx.collections.ObservableList<? extends T> pList,
                           BinaryOperator<T> pAddFunction,
                           BiFunction<T,​Integer,​? extends T> pDivideFunction)
        Fully recalculate after each change.
    • Method Detail

      • computeValue

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