Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
griffon.javafx.ReducingBindingsExtension.groovy Maven / Gradle / Ivy
/*
* SPDX-License-Identifier: Apache-2.0
*
* Copyright 2008-2021 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package griffon.javafx
import griffon.javafx.beans.binding.ReducingBindings
import groovy.transform.CompileStatic
import javafx.beans.binding.BooleanBinding
import javafx.beans.binding.DoubleBinding
import javafx.beans.binding.FloatBinding
import javafx.beans.binding.IntegerBinding
import javafx.beans.binding.LongBinding
import javafx.beans.binding.NumberBinding
import javafx.beans.binding.ObjectBinding
import javafx.beans.binding.StringBinding
import javafx.beans.value.ObservableValue
import javafx.collections.ObservableList
import javafx.collections.ObservableMap
import javafx.collections.ObservableSet
import javax.annotation.Nonnull
import javax.annotation.Nullable
import java.util.function.BinaryOperator
import java.util.function.Function
import java.util.function.Supplier
/**
* @author Andres Almiray
* @since 2.13.0
*/
@CompileStatic
final class ReducingBindingsExtension {
@Nonnull
static ObjectBinding reduce(
@Nonnull ObservableMap self, @Nullable V defaultValue, @Nonnull BinaryOperator reducer) {
ReducingBindings.reduce(self, defaultValue, reducer)
}
@Nonnull
static ObjectBinding reduce(
@Nonnull ObservableMap self, @Nonnull Supplier supplier, @Nonnull BinaryOperator reducer) {
ReducingBindings.reduce(self, supplier, reducer)
}
@Nonnull
static ObjectBinding reduce(
@Nonnull ObservableMap self,
@Nullable V defaultValue, @Nonnull ObservableValue> reducer) {
ReducingBindings.reduce(self, defaultValue, reducer)
}
@Nonnull
static ObjectBinding reduce(
@Nonnull ObservableMap self,
@Nonnull Supplier supplier, @Nonnull ObservableValue> reducer) {
ReducingBindings.reduce(self, supplier, reducer)
}
@Nonnull
static BooleanBinding reduceThenMapToBoolean(
@Nonnull ObservableMap self,
@Nullable V defaultValue, @Nonnull BinaryOperator reducer, @Nonnull Function super V, Boolean> mapper) {
ReducingBindings.reduceThenMapToBoolean(self, defaultValue, reducer, mapper)
}
@Nonnull
static BooleanBinding reduceThenMapToBoolean(
@Nonnull ObservableMap self,
@Nonnull Supplier supplier,
@Nonnull BinaryOperator reducer, @Nonnull Function super V, Boolean> mapper) {
ReducingBindings.reduceThenMapToBoolean(self, supplier, reducer, mapper)
}
@Nonnull
static BooleanBinding reduceThenMapToBoolean(
@Nonnull ObservableMap self,
@Nullable V defaultValue,
@Nonnull ObservableValue> reducer,
@Nonnull ObservableValue> mapper) {
ReducingBindings.reduceThenMapToBoolean(self, defaultValue, reducer, mapper)
}
@Nonnull
static BooleanBinding reduceThenMapToBoolean(
@Nonnull ObservableMap self,
@Nonnull Supplier supplier,
@Nonnull ObservableValue> reducer,
@Nonnull ObservableValue> mapper) {
ReducingBindings.reduceThenMapToBoolean(self, supplier, reducer, mapper)
}
@Nonnull
static IntegerBinding reduceThenMapToInteger(
@Nonnull ObservableMap self,
@Nullable V defaultValue, @Nonnull BinaryOperator reducer, @Nonnull Function super V, Integer> mapper) {
ReducingBindings.reduceThenMapToInteger(self, defaultValue, reducer, mapper)
}
@Nonnull
static IntegerBinding reduceThenMapToInteger(
@Nonnull ObservableMap self,
@Nonnull Supplier supplier,
@Nonnull BinaryOperator reducer, @Nonnull Function super V, Integer> mapper) {
ReducingBindings.reduceThenMapToInteger(self, supplier, reducer, mapper)
}
@Nonnull
static IntegerBinding reduceThenMapToInteger(
@Nonnull ObservableMap self,
@Nullable V defaultValue,
@Nonnull ObservableValue> reducer,
@Nonnull ObservableValue> mapper) {
ReducingBindings.reduceThenMapToInteger(self, defaultValue, reducer, mapper)
}
@Nonnull
static IntegerBinding reduceThenMapToInteger(
@Nonnull ObservableMap self,
@Nonnull Supplier supplier,
@Nonnull ObservableValue> reducer,
@Nonnull ObservableValue> mapper) {
ReducingBindings.reduceThenMapToInteger(self, supplier, reducer, mapper)
}
@Nonnull
static LongBinding reduceThenMapToLong(
@Nonnull ObservableMap self,
@Nullable V defaultValue, @Nonnull BinaryOperator reducer, @Nonnull Function super V, Long> mapper) {
ReducingBindings.reduceThenMapToLong(self, defaultValue, reducer, mapper)
}
@Nonnull
static LongBinding reduceThenMapToLong(
@Nonnull ObservableMap self,
@Nonnull Supplier supplier, @Nonnull BinaryOperator reducer, @Nonnull Function super V, Long> mapper) {
ReducingBindings.reduceThenMapToLong(self, supplier, reducer, mapper)
}
@Nonnull
static LongBinding reduceThenMapToLong(
@Nonnull ObservableMap self,
@Nullable V defaultValue,
@Nonnull ObservableValue> reducer,
@Nonnull ObservableValue> mapper) {
ReducingBindings.reduceThenMapToLong(self, defaultValue, reducer, mapper)
}
@Nonnull
static LongBinding reduceThenMapToLong(
@Nonnull ObservableMap self,
@Nonnull Supplier supplier,
@Nonnull ObservableValue> reducer,
@Nonnull ObservableValue> mapper) {
ReducingBindings.reduceThenMapToLong(self, supplier, reducer, mapper)
}
@Nonnull
static FloatBinding reduceThenMapToFloat(
@Nonnull ObservableMap self,
@Nullable V defaultValue, @Nonnull BinaryOperator reducer, @Nonnull Function super V, Float> mapper) {
ReducingBindings.reduceThenMapToFloat(self, defaultValue, reducer, mapper)
}
@Nonnull
static FloatBinding reduceThenMapToFloat(
@Nonnull ObservableMap self,
@Nonnull Supplier supplier, @Nonnull BinaryOperator reducer, @Nonnull Function super V, Float> mapper) {
ReducingBindings.reduceThenMapToFloat(self, supplier, reducer, mapper)
}
@Nonnull
static FloatBinding reduceThenMapToFloat(
@Nonnull ObservableMap self,
@Nullable V defaultValue,
@Nonnull ObservableValue> reducer,
@Nonnull ObservableValue> mapper) {
ReducingBindings.reduceThenMapToFloat(self, defaultValue, reducer, mapper)
}
@Nonnull
static FloatBinding reduceThenMapToFloat(
@Nonnull ObservableMap self,
@Nonnull Supplier supplier,
@Nonnull ObservableValue> reducer,
@Nonnull ObservableValue> mapper) {
ReducingBindings.reduceThenMapToFloat(self, supplier, reducer, mapper)
}
@Nonnull
static DoubleBinding reduceThenMapToDouble(
@Nonnull ObservableMap self,
@Nullable V defaultValue, @Nonnull BinaryOperator reducer, @Nonnull Function super V, Double> mapper) {
ReducingBindings.reduceThenMapToDouble(self, defaultValue, reducer, mapper)
}
@Nonnull
static DoubleBinding reduceThenMapToDouble(
@Nonnull ObservableMap self,
@Nonnull Supplier supplier,
@Nonnull BinaryOperator reducer, @Nonnull Function super V, Double> mapper) {
ReducingBindings.reduceThenMapToDouble(self, supplier, reducer, mapper)
}
@Nonnull
static DoubleBinding reduceThenMapToDouble(
@Nonnull ObservableMap self,
@Nullable V defaultValue,
@Nonnull ObservableValue> reducer,
@Nonnull ObservableValue> mapper) {
ReducingBindings.reduceThenMapToDouble(self, defaultValue, reducer, mapper)
}
@Nonnull
static DoubleBinding reduceThenMapToDouble(
@Nonnull ObservableMap self,
@Nonnull Supplier supplier,
@Nonnull ObservableValue> reducer,
@Nonnull ObservableValue> mapper) {
ReducingBindings.reduceThenMapToDouble(self, supplier, reducer, mapper)
}
@Nonnull
static StringBinding reduceThenMapToString(
@Nonnull ObservableMap self,
@Nullable V defaultValue, @Nonnull BinaryOperator reducer, @Nonnull Function super V, String> mapper) {
ReducingBindings.reduceThenMapToString(self, defaultValue, reducer, mapper)
}
@Nonnull
static StringBinding reduceThenMapToString(
@Nonnull ObservableMap self,
@Nonnull Supplier supplier,
@Nonnull BinaryOperator reducer, @Nonnull Function super V, String> mapper) {
ReducingBindings.reduceThenMapToString(self, supplier, reducer, mapper)
}
@Nonnull
static StringBinding reduceThenMapToString(
@Nonnull ObservableMap self,
@Nullable V defaultValue,
@Nonnull ObservableValue> reducer,
@Nonnull ObservableValue> mapper) {
ReducingBindings.reduceThenMapToString(self, defaultValue, reducer, mapper)
}
@Nonnull
static StringBinding reduceThenMapToString(
@Nonnull ObservableMap self,
@Nonnull Supplier supplier,
@Nonnull ObservableValue> reducer,
@Nonnull ObservableValue> mapper) {
ReducingBindings.reduceThenMapToString(self, supplier, reducer, mapper)
}
@Nonnull
static ObjectBinding reduce(
@Nonnull ObservableList self, @Nullable T defaultValue, @Nonnull BinaryOperator reducer) {
ReducingBindings.reduce(self, defaultValue, reducer)
}
@Nonnull
static ObjectBinding reduce(
@Nonnull ObservableList self, @Nonnull Supplier supplier, @Nonnull BinaryOperator reducer) {
ReducingBindings.reduce(self, supplier, reducer)
}
@Nonnull
static ObjectBinding reduce(
@Nonnull ObservableList self,
@Nullable T defaultValue, @Nonnull ObservableValue> reducer) {
ReducingBindings.reduce(self, defaultValue, reducer)
}
@Nonnull
static ObjectBinding reduce(
@Nonnull ObservableList self,
@Nonnull Supplier supplier, @Nonnull ObservableValue> reducer) {
ReducingBindings.reduce(self, supplier, reducer)
}
@Nonnull
static StringBinding reduceThenMapToString(
@Nonnull ObservableList self,
@Nullable T defaultValue, @Nonnull BinaryOperator reducer, @Nonnull Function super T, String> mapper) {
ReducingBindings.reduceThenMapToString(self, defaultValue, reducer, mapper)
}
@Nonnull
static StringBinding reduceThenMapToString(
@Nonnull ObservableList self,
@Nonnull Supplier supplier,
@Nonnull BinaryOperator reducer, @Nonnull Function super T, String> mapper) {
ReducingBindings.reduceThenMapToString(self, supplier, reducer, mapper)
}
@Nonnull
static StringBinding reduceThenMapToString(
@Nonnull ObservableList self,
@Nullable T defaultValue,
@Nonnull ObservableValue> reducer,
@Nonnull ObservableValue> mapper) {
ReducingBindings.reduceThenMapToString(self, defaultValue, reducer, mapper)
}
@Nonnull
static StringBinding reduceThenMapToString(
@Nonnull ObservableList self,
@Nonnull Supplier supplier,
@Nonnull ObservableValue> reducer,
@Nonnull ObservableValue> mapper) {
ReducingBindings.reduceThenMapToString(self, supplier, reducer, mapper)
}
@Nonnull
static IntegerBinding reduceThenMapToInteger(
@Nonnull ObservableList self,
@Nullable T defaultValue, @Nonnull BinaryOperator reducer, @Nonnull Function super T, Integer> mapper) {
ReducingBindings.reduceThenMapToInteger(self, defaultValue, reducer, mapper)
}
@Nonnull
static IntegerBinding reduceThenMapToInteger(
@Nonnull ObservableList self,
@Nonnull Supplier supplier,
@Nonnull BinaryOperator reducer, @Nonnull Function super T, Integer> mapper) {
ReducingBindings.reduceThenMapToInteger(self, supplier, reducer, mapper)
}
@Nonnull
static IntegerBinding reduceThenMapToInteger(
@Nonnull ObservableList self,
@Nullable T defaultValue,
@Nonnull ObservableValue> reducer,
@Nonnull ObservableValue> mapper) {
ReducingBindings.reduceThenMapToInteger(self, defaultValue, reducer, mapper)
}
@Nonnull
static IntegerBinding reduceThenMapToInteger(
@Nonnull ObservableList self,
@Nonnull Supplier supplier,
@Nonnull ObservableValue> reducer,
@Nonnull ObservableValue> mapper) {
ReducingBindings.reduceThenMapToInteger(self, supplier, reducer, mapper)
}
@Nonnull
static LongBinding reduceThenMapToLong(
@Nonnull ObservableList self,
@Nullable T defaultValue, @Nonnull BinaryOperator reducer, @Nonnull Function super T, Long> mapper) {
ReducingBindings.reduceThenMapToLong(self, defaultValue, reducer, mapper)
}
@Nonnull
static LongBinding reduceThenMapToLong(
@Nonnull ObservableList self,
@Nonnull Supplier supplier, @Nonnull BinaryOperator reducer, @Nonnull Function super T, Long> mapper) {
ReducingBindings.reduceThenMapToLong(self, supplier, reducer, mapper)
}
@Nonnull
static LongBinding reduceThenMapToLong(
@Nonnull ObservableList self,
@Nullable T defaultValue,
@Nonnull ObservableValue> reducer,
@Nonnull ObservableValue> mapper) {
ReducingBindings.reduceThenMapToLong(self, defaultValue, reducer, mapper)
}
@Nonnull
static LongBinding reduceThenMapToLong(
@Nonnull ObservableList self,
@Nonnull Supplier supplier,
@Nonnull ObservableValue> reducer,
@Nonnull ObservableValue> mapper) {
ReducingBindings.reduceThenMapToLong(self, supplier, reducer, mapper)
}
@Nonnull
static FloatBinding reduceThenMapToFloat(
@Nonnull ObservableList self,
@Nullable T defaultValue, @Nonnull BinaryOperator reducer, @Nonnull Function super T, Float> mapper) {
ReducingBindings.reduceThenMapToFloat(self, defaultValue, reducer, mapper)
}
@Nonnull
static FloatBinding reduceThenMapToFloat(
@Nonnull ObservableList self,
@Nonnull Supplier supplier, @Nonnull BinaryOperator reducer, @Nonnull Function super T, Float> mapper) {
ReducingBindings.reduceThenMapToFloat(self, supplier, reducer, mapper)
}
@Nonnull
static FloatBinding reduceThenMapToFloat(
@Nonnull ObservableList self,
@Nullable T defaultValue,
@Nonnull ObservableValue> reducer,
@Nonnull ObservableValue> mapper) {
ReducingBindings.reduceThenMapToFloat(self, defaultValue, reducer, mapper)
}
@Nonnull
static FloatBinding reduceThenMapToFloat(
@Nonnull ObservableList self,
@Nonnull Supplier supplier,
@Nonnull ObservableValue> reducer,
@Nonnull ObservableValue> mapper) {
ReducingBindings.reduceThenMapToFloat(self, supplier, reducer, mapper)
}
@Nonnull
static DoubleBinding reduceThenMapToDouble(
@Nonnull ObservableList self,
@Nullable T defaultValue, @Nonnull BinaryOperator reducer, @Nonnull Function super T, Double> mapper) {
ReducingBindings.reduceThenMapToDouble(self, defaultValue, reducer, mapper)
}
@Nonnull
static DoubleBinding reduceThenMapToDouble(
@Nonnull ObservableList self,
@Nonnull Supplier supplier,
@Nonnull BinaryOperator reducer, @Nonnull Function super T, Double> mapper) {
ReducingBindings.reduceThenMapToDouble(self, supplier, reducer, mapper)
}
@Nonnull
static DoubleBinding reduceThenMapToDouble(
@Nonnull ObservableList self,
@Nullable T defaultValue,
@Nonnull ObservableValue> reducer,
@Nonnull ObservableValue> mapper) {
ReducingBindings.reduceThenMapToDouble(self, defaultValue, reducer, mapper)
}
@Nonnull
static DoubleBinding reduceThenMapToDouble(
@Nonnull ObservableList self,
@Nonnull Supplier supplier,
@Nonnull ObservableValue> reducer,
@Nonnull ObservableValue> mapper) {
ReducingBindings.reduceThenMapToDouble(self, supplier, reducer, mapper)
}
@Nonnull
static BooleanBinding reduceThenMapToBoolean(
@Nonnull ObservableList self,
@Nullable T defaultValue, @Nonnull BinaryOperator reducer, @Nonnull Function super T, Boolean> mapper) {
ReducingBindings.reduceThenMapToBoolean(self, defaultValue, reducer, mapper)
}
@Nonnull
static BooleanBinding reduceThenMapToBoolean(
@Nonnull ObservableList self,
@Nonnull Supplier supplier,
@Nonnull BinaryOperator reducer, @Nonnull Function super T, Boolean> mapper) {
ReducingBindings.reduceThenMapToBoolean(self, supplier, reducer, mapper)
}
@Nonnull
static BooleanBinding reduceThenMapToBoolean(
@Nonnull ObservableList self,
@Nullable T defaultValue,
@Nonnull ObservableValue> reducer,
@Nonnull ObservableValue> mapper) {
ReducingBindings.reduceThenMapToBoolean(self, defaultValue, reducer, mapper)
}
@Nonnull
static BooleanBinding reduceThenMapToBoolean(
@Nonnull ObservableList self,
@Nonnull Supplier supplier,
@Nonnull ObservableValue> reducer,
@Nonnull ObservableValue> mapper) {
ReducingBindings.reduceThenMapToBoolean(self, supplier, reducer, mapper)
}
@Nonnull
static NumberBinding reduceThenMapToNumber(
@Nonnull ObservableList self,
@Nullable T defaultValue,
@Nonnull BinaryOperator reducer, @Nonnull Function super T, ? extends Number> mapper) {
ReducingBindings.reduceThenMapToNumber(self, defaultValue, reducer, mapper)
}
@Nonnull
static NumberBinding reduceThenMapToNumber(
@Nonnull ObservableList self,
@Nonnull Supplier supplier,
@Nonnull BinaryOperator reducer, @Nonnull Function super T, Number> mapper) {
ReducingBindings.reduceThenMapToNumber(self, supplier, reducer, mapper)
}
@Nonnull
static NumberBinding reduceThenMapToNumber(
@Nonnull ObservableList self,
@Nullable T defaultValue,
@Nonnull ObservableValue> reducer,
@Nonnull ObservableValue> mapper) {
ReducingBindings.reduceThenMapToNumber(self, defaultValue, reducer, mapper)
}
@Nonnull
static NumberBinding reduceThenMapToNumber(
@Nonnull ObservableList self,
@Nonnull Supplier supplier,
@Nonnull ObservableValue> reducer,
@Nonnull ObservableValue> mapper) {
ReducingBindings.reduceThenMapToNumber(self, supplier, reducer, mapper)
}
@Nonnull
static ObjectBinding reduce(
@Nonnull ObservableSet self, @Nullable T defaultValue, @Nonnull BinaryOperator reducer) {
ReducingBindings.reduce(self, defaultValue, reducer)
}
@Nonnull
static ObjectBinding reduce(
@Nonnull ObservableSet