All Downloads are FREE. Search and download functionalities are using the official Maven repository.

griffon.javafx.CollectionBindingsExtension.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.CollectionBindings
import groovy.transform.CompileStatic
import javafx.beans.binding.NumberBinding
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.Function
import java.util.function.Supplier
import java.util.function.ToDoubleFunction

/**
 * @author Andres Almiray
 * @since 2.13.0
 */
@CompileStatic
final class CollectionBindingsExtension {
    @Nonnull
    static StringBinding join(@Nonnull ObservableList self, @Nullable String delimiter) {
        CollectionBindings.joinList(self, delimiter)
    }

    @Nonnull
    static  StringBinding join(
        @Nonnull ObservableList self, @Nullable String delimiter, @Nonnull Function mapper) {
        CollectionBindings.joinList(self, delimiter, mapper)
    }

    @Nonnull
    static StringBinding join(@Nonnull ObservableList self, @Nonnull ObservableValue delimiter) {
        CollectionBindings.joinList(self, delimiter)
    }

    @Nonnull
    static  StringBinding join(
        @Nonnull ObservableList self,
        @Nonnull ObservableValue delimiter, @Nonnull ObservableValue> mapper) {
        CollectionBindings.joinList(self, delimiter, mapper)
    }

    @Nonnull
    static StringBinding join(@Nonnull ObservableSet self, @Nullable String delimiter) {
        CollectionBindings.joinSet(self, delimiter)
    }

    @Nonnull
    static  StringBinding join(
        @Nonnull ObservableSet self, @Nullable String delimiter, @Nonnull Function mapper) {
        CollectionBindings.joinSet(self, delimiter, mapper)
    }

    @Nonnull
    static StringBinding join(@Nonnull ObservableSet self, @Nonnull ObservableValue delimiter) {
        CollectionBindings.joinSet(self, delimiter)
    }

    @Nonnull
    static  StringBinding join(
        @Nonnull ObservableSet self,
        @Nonnull ObservableValue delimiter, @Nonnull ObservableValue> mapper) {
        CollectionBindings.joinSet(self, delimiter, mapper)
    }

    @Nonnull
    static  StringBinding join(@Nonnull ObservableMap self, @Nullable String delimiter) {
        CollectionBindings.joinMap(self, delimiter)
    }

    @Nonnull
    static  StringBinding join(
        @Nonnull ObservableMap self,
        @Nullable String delimiter, @Nonnull Function, String> mapper) {
        CollectionBindings.joinMap(self, delimiter, mapper)
    }

    @Nonnull
    static  StringBinding join(@Nonnull ObservableMap self, @Nonnull ObservableValue delimiter) {
        CollectionBindings.joinMap(self, delimiter)
    }

    @Nonnull
    static  StringBinding join(
        @Nonnull ObservableMap self,
        @Nonnull ObservableValue delimiter,
        @Nonnull ObservableValue, String>> mapper) {
        CollectionBindings.joinMap(self, delimiter, mapper)
    }

    @Nonnull
    static NumberBinding min(@Nonnull ObservableList self, @Nonnull Number defaultValue) {
        CollectionBindings.minInList(self, defaultValue)
    }

    @Nonnull
    static NumberBinding min(
        @Nonnull ObservableList self, @Nonnull Supplier supplier) {
        CollectionBindings.minInList(self, supplier)
    }

    @Nonnull
    static NumberBinding max(@Nonnull ObservableList self, @Nonnull Number defaultValue) {
        CollectionBindings.maxInList(self, defaultValue)
    }

    @Nonnull
    static NumberBinding max(
        @Nonnull ObservableList self, @Nonnull Supplier supplier) {
        CollectionBindings.maxInList(self, supplier)
    }

    @Nonnull
    static NumberBinding average(@Nonnull ObservableList self, @Nonnull Number defaultValue) {
        CollectionBindings.averageInList(self, defaultValue)
    }

    @Nonnull
    static NumberBinding average(
        @Nonnull ObservableList self, @Nonnull Supplier supplier) {
        CollectionBindings.averageInList(self, supplier)
    }

    @Nonnull
    static NumberBinding sum(@Nonnull ObservableList self) {
        CollectionBindings.sumOfList(self)
    }

    @Nonnull
    static  NumberBinding min(
        @Nonnull ObservableList self, @Nonnull Number defaultValue, @Nonnull ToDoubleFunction mapper) {
        CollectionBindings.minInList(self, defaultValue, mapper)
    }

    @Nonnull
    static  NumberBinding min(
        @Nonnull ObservableList self,
        @Nonnull Supplier supplier, @Nonnull ToDoubleFunction mapper) {
        CollectionBindings.minInList(self, supplier, mapper)
    }

    @Nonnull
    static  NumberBinding max(
        @Nonnull ObservableList self, @Nonnull Number defaultValue, @Nonnull ToDoubleFunction mapper) {
        CollectionBindings.maxInList(self, defaultValue, mapper)
    }

    @Nonnull
    static  NumberBinding max(
        @Nonnull ObservableList self,
        @Nonnull Supplier supplier, @Nonnull ToDoubleFunction mapper) {
        CollectionBindings.maxInList(self, supplier, mapper)
    }

    @Nonnull
    static  NumberBinding average(
        @Nonnull ObservableList self, @Nonnull Number defaultValue, @Nonnull ToDoubleFunction mapper) {
        CollectionBindings.averageInList(self, defaultValue, mapper)
    }

    @Nonnull
    static  NumberBinding average(
        @Nonnull ObservableList self,
        @Nonnull Supplier supplier, @Nonnull ToDoubleFunction mapper) {
        CollectionBindings.averageInList(self, supplier, mapper)
    }

    @Nonnull
    static  NumberBinding sum(@Nonnull ObservableList self, @Nonnull ToDoubleFunction mapper) {
        CollectionBindings.sumOfList(self, mapper)
    }

    @Nonnull
    static  NumberBinding min(
        @Nonnull ObservableList self,
        @Nonnull Number defaultValue, @Nonnull ObservableValue> mapper) {
        CollectionBindings.minInList(self, defaultValue, mapper)
    }

    @Nonnull
    static  NumberBinding min(
        @Nonnull ObservableList self,
        @Nonnull Supplier supplier, @Nonnull ObservableValue> mapper) {
        CollectionBindings.minInList(self, supplier, mapper)
    }

    @Nonnull
    static  NumberBinding max(
        @Nonnull ObservableList self,
        @Nonnull Number defaultValue, @Nonnull ObservableValue> mapper) {
        CollectionBindings.maxInList(self, defaultValue, mapper)
    }

    @Nonnull
    static  NumberBinding max(
        @Nonnull ObservableList self,
        @Nonnull Supplier supplier, @Nonnull ObservableValue> mapper) {
        CollectionBindings.maxInList(self, supplier, mapper)
    }

    @Nonnull
    static  NumberBinding average(
        @Nonnull ObservableList self,
        @Nonnull Number defaultValue, @Nonnull ObservableValue> mapper) {
        CollectionBindings.averageInList(self, defaultValue, mapper)
    }

    @Nonnull
    static  NumberBinding average(
        @Nonnull ObservableList self,
        @Nonnull Supplier supplier, @Nonnull ObservableValue> mapper) {
        CollectionBindings.averageInList(self, supplier, mapper)
    }

    @Nonnull
    static  NumberBinding sum(
        @Nonnull ObservableList self, @Nonnull ObservableValue> mapper) {
        CollectionBindings.sumOfList(self, mapper)
    }

    @Nonnull
    static NumberBinding min(@Nonnull ObservableSet self, @Nonnull Number defaultValue) {
        CollectionBindings.minInSet(self, defaultValue)
    }

    @Nonnull
    static NumberBinding min(
        @Nonnull ObservableSet self, @Nonnull Supplier supplier) {
        CollectionBindings.minInSet(self, supplier)
    }

    @Nonnull
    static NumberBinding max(@Nonnull ObservableSet self, @Nonnull Number defaultValue) {
        CollectionBindings.maxInSet(self, defaultValue)
    }

    @Nonnull
    static NumberBinding max(
        @Nonnull ObservableSet self, @Nonnull Supplier supplier) {
        CollectionBindings.maxInSet(self, supplier)
    }

    @Nonnull
    static NumberBinding average(@Nonnull ObservableSet self, @Nonnull Number defaultValue) {
        CollectionBindings.averageInSet(self, defaultValue)
    }

    @Nonnull
    static NumberBinding average(
        @Nonnull ObservableSet self, @Nonnull Supplier supplier) {
        CollectionBindings.averageInSet(self, supplier)
    }

    @Nonnull
    static NumberBinding sum(@Nonnull ObservableSet self) {
        CollectionBindings.sumOfSet(self)
    }

    @Nonnull
    static  NumberBinding min(
        @Nonnull ObservableSet self, @Nonnull Number defaultValue, @Nonnull ToDoubleFunction mapper) {
        CollectionBindings.minInSet(self, defaultValue, mapper)
    }

    @Nonnull
    static  NumberBinding min(
        @Nonnull ObservableSet self,
        @Nonnull Supplier supplier, @Nonnull ToDoubleFunction mapper) {
        CollectionBindings.minInSet(self, supplier, mapper)
    }

    @Nonnull
    static  NumberBinding max(
        @Nonnull ObservableSet self, @Nonnull Number defaultValue, @Nonnull ToDoubleFunction mapper) {
        CollectionBindings.maxInSet(self, defaultValue, mapper)
    }

    @Nonnull
    static  NumberBinding max(
        @Nonnull ObservableSet self,
        @Nonnull Supplier supplier, @Nonnull ToDoubleFunction mapper) {
        CollectionBindings.maxInSet(self, supplier, mapper)
    }

    @Nonnull
    static  NumberBinding average(
        @Nonnull ObservableSet self, @Nonnull Number defaultValue, @Nonnull ToDoubleFunction mapper) {
        CollectionBindings.averageInSet(self, defaultValue, mapper)
    }

    @Nonnull
    static  NumberBinding average(
        @Nonnull ObservableSet self,
        @Nonnull Supplier supplier, @Nonnull ToDoubleFunction mapper) {
        CollectionBindings.averageInSet(self, supplier, mapper)
    }

    @Nonnull
    static  NumberBinding sum(@Nonnull ObservableSet self, @Nonnull ToDoubleFunction mapper) {
        CollectionBindings.sumOfSet(self, mapper)
    }

    @Nonnull
    static  NumberBinding min(
        @Nonnull ObservableSet self,
        @Nonnull Number defaultValue, @Nonnull ObservableValue> mapper) {
        CollectionBindings.minInSet(self, defaultValue, mapper)
    }

    @Nonnull
    static  NumberBinding min(
        @Nonnull ObservableSet self,
        @Nonnull Supplier supplier, @Nonnull ObservableValue> mapper) {
        CollectionBindings.minInSet(self, supplier, mapper)
    }

    @Nonnull
    static  NumberBinding max(
        @Nonnull ObservableSet self,
        @Nonnull Number defaultValue, @Nonnull ObservableValue> mapper) {
        CollectionBindings.maxInSet(self, defaultValue, mapper)
    }

    @Nonnull
    static  NumberBinding max(
        @Nonnull ObservableSet self,
        @Nonnull Supplier supplier, @Nonnull ObservableValue> mapper) {
        CollectionBindings.maxInSet(self, supplier, mapper)
    }

    @Nonnull
    static  NumberBinding average(
        @Nonnull ObservableSet self,
        @Nonnull Number defaultValue, @Nonnull ObservableValue> mapper) {
        CollectionBindings.averageInSet(self, defaultValue, mapper)
    }

    @Nonnull
    static  NumberBinding average(
        @Nonnull ObservableSet self,
        @Nonnull Supplier supplier, @Nonnull ObservableValue> mapper) {
        CollectionBindings.averageInSet(self, supplier, mapper)
    }

    @Nonnull
    static  NumberBinding sum(
        @Nonnull ObservableSet self, @Nonnull ObservableValue> mapper) {
        CollectionBindings.sumOfSet(self, mapper)
    }

    @Nonnull
    static  NumberBinding min(
        @Nonnull ObservableMap self, @Nonnull Number defaultValue) {
        CollectionBindings.minInMap(self, defaultValue)
    }

    @Nonnull
    static  NumberBinding min(
        @Nonnull ObservableMap self, @Nonnull Supplier supplier) {
        CollectionBindings.minInMap(self, supplier)
    }

    @Nonnull
    static  NumberBinding max(
        @Nonnull ObservableMap self, @Nonnull Number defaultValue) {
        CollectionBindings.maxInMap(self, defaultValue)
    }

    @Nonnull
    static  NumberBinding max(
        @Nonnull ObservableMap self, @Nonnull Supplier supplier) {
        CollectionBindings.maxInMap(self, supplier)
    }

    @Nonnull
    static  NumberBinding average(
        @Nonnull ObservableMap self, @Nonnull Number defaultValue) {
        CollectionBindings.averageInMap(self, defaultValue)
    }

    @Nonnull
    static  NumberBinding average(
        @Nonnull ObservableMap self, @Nonnull Supplier supplier) {
        CollectionBindings.averageInMap(self, supplier)
    }

    @Nonnull
    static  NumberBinding sum(@Nonnull ObservableMap self) {
        CollectionBindings.sumOfMap(self)
    }

    @Nonnull
    static  NumberBinding min(
        @Nonnull ObservableMap self,
        @Nonnull Number defaultValue, @Nonnull ToDoubleFunction mapper) {
        CollectionBindings.minInMap(self, defaultValue, mapper)
    }

    @Nonnull
    static  NumberBinding min(
        @Nonnull ObservableMap self,
        @Nonnull Supplier supplier, @Nonnull ToDoubleFunction mapper) {
        CollectionBindings.minInMap(self, supplier, mapper)
    }

    @Nonnull
    static  NumberBinding max(
        @Nonnull ObservableMap self,
        @Nonnull Number defaultValue, @Nonnull ToDoubleFunction mapper) {
        CollectionBindings.maxInMap(self, defaultValue, mapper)
    }

    @Nonnull
    static  NumberBinding max(
        @Nonnull ObservableMap self,
        @Nonnull Supplier supplier, @Nonnull ToDoubleFunction mapper) {
        CollectionBindings.maxInMap(self, supplier, mapper)
    }

    @Nonnull
    static  NumberBinding average(
        @Nonnull ObservableMap self,
        @Nonnull Number defaultValue, @Nonnull ToDoubleFunction mapper) {
        CollectionBindings.averageInMap(self, defaultValue, mapper)
    }

    @Nonnull
    static  NumberBinding average(
        @Nonnull ObservableMap self,
        @Nonnull Supplier supplier, @Nonnull ToDoubleFunction mapper) {
        CollectionBindings.averageInMap(self, supplier, mapper)
    }

    @Nonnull
    static  NumberBinding sum(
        @Nonnull ObservableMap self, @Nonnull ToDoubleFunction mapper) {
        CollectionBindings.sumOfMap(self, mapper)
    }

    @Nonnull
    static  NumberBinding min(
        @Nonnull ObservableMap self,
        @Nonnull Number defaultValue, @Nonnull ObservableValue> mapper) {
        CollectionBindings.minInMap(self, defaultValue, mapper)
    }

    @Nonnull
    static  NumberBinding min(
        @Nonnull ObservableMap self,
        @Nonnull Supplier supplier, @Nonnull ObservableValue> mapper) {
        CollectionBindings.minInMap(self, supplier, mapper)
    }

    @Nonnull
    static  NumberBinding max(
        @Nonnull ObservableMap self,
        @Nonnull Number defaultValue, @Nonnull ObservableValue> mapper) {
        CollectionBindings.maxInMap(self, defaultValue, mapper)
    }

    @Nonnull
    static  NumberBinding max(
        @Nonnull ObservableMap self,
        @Nonnull Supplier supplier, @Nonnull ObservableValue> mapper) {
        CollectionBindings.maxInMap(self, supplier, mapper)
    }

    @Nonnull
    static  NumberBinding average(
        @Nonnull ObservableMap self,
        @Nonnull Number defaultValue, @Nonnull ObservableValue> mapper) {
        CollectionBindings.averageInMap(self, defaultValue, mapper)
    }

    @Nonnull
    static  NumberBinding average(
        @Nonnull ObservableMap self,
        @Nonnull Supplier supplier, @Nonnull ObservableValue> mapper) {
        CollectionBindings.averageInMap(self, supplier, mapper)
    }

    @Nonnull
    static  NumberBinding sum(
        @Nonnull ObservableMap self, @Nonnull ObservableValue> mapper) {
        CollectionBindings.sumOfMap(self, mapper)
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy