maksaska commented on code in PR #11995: URL: https://github.com/apache/ignite/pull/11995#discussion_r2055948158
########## modules/core/src/main/java/org/apache/ignite/internal/util/lang/ClusterNodeFunc.java: ########## @@ -0,0 +1,289 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You 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.apache.ignite.internal.util.lang; + +import java.util.Arrays; +import java.util.Collection; +import java.util.Collections; +import java.util.HashSet; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.UUID; +import org.apache.ignite.cluster.BaselineNode; +import org.apache.ignite.cluster.ClusterNode; +import org.apache.ignite.internal.binary.BinaryArray; +import org.apache.ignite.internal.util.F0; +import org.apache.ignite.internal.util.lang.gridfunc.ContainsNodeIdsPredicate; +import org.apache.ignite.internal.util.lang.gridfunc.EqualsClusterNodeIdPredicate; +import org.apache.ignite.internal.util.lang.gridfunc.IsAllPredicate; +import org.apache.ignite.internal.util.lang.gridfunc.NoOpClosure; +import org.apache.ignite.internal.util.typedef.F; +import org.apache.ignite.internal.util.typedef.internal.A; +import org.apache.ignite.lang.IgnitePredicate; +import org.jetbrains.annotations.Nullable; + +/** + * Contains factory and utility methods for {@code closures}, {@code predicates}, and {@code tuples}. + * It also contains functional style collection comprehensions. + * <p> + * Most of the methods in this class can be divided into two groups: + * <ul> + * <li><b>Factory</b> higher-order methods for closures, predicates and tuples, and</li> + * <li><b>Utility</b> higher-order methods for processing collections with closures and predicates.</li> + * </ul> + * Note that contrary to the usual design this class has substantial number of + * methods (over 200). This design is chosen to simulate a global namespace + * (like a {@code Predef} in Scala) to provide general utility and functional + * programming functionality in a shortest syntactical context using {@code F} + * typedef. + * <p> + * Also note, that in all methods with predicates, null predicate has a {@code true} meaning. So does + * the empty predicate array. + */ +@SuppressWarnings("unchecked") +public class ClusterNodeFunc { + /** */ + private static final GridAbsClosure NOOP = new NoOpClosure(); Review Comment: Done -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: notifications-unsubscr...@ignite.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org