<commit_before>/*
 * Copyright (c) 2012, 2013, <NAME> (<NAME>), <NAME>.
 * 
 * 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 org.javamoney.calc.function;

import java.util.Arrays;
import java.util.Collection;

import javax.money.CurrencyUnit;
import javax.money.MonetaryAmount;


/**
 * This class provides access to several predicate based functionalities that
 * are useful for monetary manipulations. Hereby this class provides
 * functionalities to of and combine predicates as, well as predicate based
 * filtering and visiting of {@link Iterable} instances.
 *
 * @author <NAME>
 */
public final class MonetaryPredicates{

    /**
     * Singleton constructor.
     */
    private MonetaryPredicates(){
        // singleton constructor
    }

    /**
     * This method provides a predicate that is constructed by all predicates
     * passed, where every predicate must evaluate to {@code true}.
     *
     * @param predicates The predicates to evaluate.
     * @return a {@link MonetaryPredicate} evaluating to true, if every predicate return
     * true, or no predicates are passed, never {@code null}.
     */
    @SafeVarargs
    public static <T> MonetaryPredicate<T> and(Iterable<? extends MonetaryPredicate<? super T>>... predicates){
        return new AndPredicate<>(predicates);
    }<commit_msg>9: Java 8 problems in javamoney-calc <commit_after>/*
 * Copyright (c) 2012, 2013, <NAME> (<NAME>), <NAME>.
 * 
 * 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 org.javamoney.calc.function;

import java.util.Arrays;
import java.util.Collection;


/**
 * This class provides access to several predicate based functionalities that
 * are useful for monetary manipulations. Hereby this class provides
 * functionalities to of and combine predicates as, well as predicate based
 * filtering and visiting of {@link Iterable} instances.
 *
 * @author <NAME>
 */
public final class MonetaryPredicates{

    /**
     * Singleton constructor.
     */
    private MonetaryPredicates(){
        // singleton constructor
    }

    /**
     * This method provides a predicate that is constructed by all predicates
     * passed, where every predicate must evaluate to {@code true}.
     *
     * @param predicates The predicates to evaluate.
     * @return a {@link MonetaryPredicate} evaluating to true, if every predicate return
     * true, or no predicates are passed, never {@code null}.
     */
    @SafeVarargs
    public static <T> MonetaryPredicate<T> and(Iterable<? extends MonetaryPredicate<? super T>>... predicates){
        return new AndPredicate<>(predicates);
    }
{'fraction_non_alphanumeric': 0.08736521979541056, 'fraction_numerical': 0.007188277578103401, 'mean_word_length': 3.5056039850560397, 'pattern_counts': {'":': 0, '<': 21, '<?xml version=': 0, '>': 21, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5832837', 'n_tokens_mistral': 965, 'n_tokens_neox': 912, 'n_words': 412}