Module com.iamsoft.util.ui
Class SumBinding<T>
java.lang.Object
javafx.beans.binding.ObjectExpression<T>
javafx.beans.binding.ObjectBinding<T>
com.iamsoft.util.ui.javafx.collections.reduction.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
ConstructorsConstructorDescriptionSumBinding
(javafx.collections.ObservableList<? extends T> pList, T pIdentity, BinaryOperator<T> pAddFunction) Fully recalculate after each change. -
Method Summary
Modifier and TypeMethodDescriptionprotected T
static <T> T
computeValue
(Iterable<? extends T> pIterable, T pIdentity, BinaryOperator<T> pAddFunction) static <T> T
computeValue
(Iterator<? extends T> pIterator, T pIdentity, BinaryOperator<T> pAddFunction) 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
-
SumBinding
public SumBinding(javafx.collections.ObservableList<? extends T> pList, T pIdentity, BinaryOperator<T> pAddFunction) Fully recalculate after each change.
-
-
Method Details
-
computeValue
- Specified by:
computeValue
in classjavafx.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)
-