Class SumBinding<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 SumBinding<T>
    extends javafx.beans.binding.ObjectBinding<T>
    Sums items in a list.
    See Also:
    EasyBind.combine(ObservableList, Function), ObservableSum
    • Constructor Summary

      Constructors 
      Constructor Description
      SumBinding​(javafx.collections.ObservableList<? extends T> pList, T pIdentity, BinaryOperator<T> pAddFunction)
      Fully recalculate after each change.
    • Constructor Detail

      • SumBinding

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

      • computeValue

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

        public static <T> T computeValue​(Iterable<? extends T> pIterable,
                                         T pIdentity,
                                         BinaryOperator<T> pAddFunction)
      • computeValue

        public static <T> T computeValue​(Iterator<? extends T> pIterator,
                                         T pIdentity,
                                         BinaryOperator<T> pAddFunction)