Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id DCAE6200C54 for ; Wed, 12 Apr 2017 17:58:00 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id DAF73160BA9; Wed, 12 Apr 2017 15:58:00 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 36FE6160BA8 for ; Wed, 12 Apr 2017 17:57:59 +0200 (CEST) Received: (qmail 13500 invoked by uid 500); 12 Apr 2017 15:57:58 -0000 Mailing-List: contact commits-help@ignite.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ignite.apache.org Delivered-To: mailing list commits@ignite.apache.org Received: (qmail 13422 invoked by uid 99); 12 Apr 2017 15:57:58 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 12 Apr 2017 15:57:58 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 2FC8AE027A; Wed, 12 Apr 2017 15:57:58 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: agura@apache.org To: commits@ignite.apache.org Date: Wed, 12 Apr 2017 15:57:58 -0000 Message-Id: <243c86cf358e4457aacd6fb5d3cfec56@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [01/11] ignite git commit: ignite-3682: all anonymous classes were extracted archived-at: Wed, 12 Apr 2017 15:58:01 -0000 Repository: ignite Updated Branches: refs/heads/master a9ffced14 -> 252f00416 http://git-wip-us.apache.org/repos/asf/ignite/blob/9165b0d6/modules/core/src/main/java/org/apache/ignite/internal/util/lang/gridfunc/IgnitePredicateContainWrapper.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/util/lang/gridfunc/IgnitePredicateContainWrapper.java b/modules/core/src/main/java/org/apache/ignite/internal/util/lang/gridfunc/IgnitePredicateContainWrapper.java new file mode 100644 index 0000000..546686c --- /dev/null +++ b/modules/core/src/main/java/org/apache/ignite/internal/util/lang/gridfunc/IgnitePredicateContainWrapper.java @@ -0,0 +1,55 @@ +/* + * 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.gridfunc; + +import java.util.Collection; +import org.apache.ignite.internal.util.typedef.internal.S; +import org.apache.ignite.lang.IgnitePredicate; + +/** + * Predicate which returns {@code true} if it receives an element that is contained in the passed in + * collection. + * + * @param Type of the free variable for the predicate and type of the collection elements. + */ +public class IgnitePredicateContainWrapper implements IgnitePredicate { + /** */ + private static final long serialVersionUID = 0L; + + /** */ + private final Collection c; + + /** + * @param c Collection to check for containment. + */ + public IgnitePredicateContainWrapper(Collection c) { + this.c = c; + } + + /** {@inheritDoc} */ + @Override public boolean apply(T t) { + assert c != null; + + return c.contains(t); + } + + /** {@inheritDoc} */ + public String toString() { + return S.toString(IgnitePredicateContainWrapper.class, this); + } +} http://git-wip-us.apache.org/repos/asf/ignite/blob/9165b0d6/modules/core/src/main/java/org/apache/ignite/internal/util/lang/gridfunc/IgnitePredicateEqualsClusterNodeId.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/util/lang/gridfunc/IgnitePredicateEqualsClusterNodeId.java b/modules/core/src/main/java/org/apache/ignite/internal/util/lang/gridfunc/IgnitePredicateEqualsClusterNodeId.java new file mode 100644 index 0000000..4283068 --- /dev/null +++ b/modules/core/src/main/java/org/apache/ignite/internal/util/lang/gridfunc/IgnitePredicateEqualsClusterNodeId.java @@ -0,0 +1,51 @@ +/* + * 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.gridfunc; + +import java.util.UUID; +import org.apache.ignite.cluster.ClusterNode; +import org.apache.ignite.internal.util.typedef.internal.S; +import org.apache.ignite.lang.IgnitePredicate; + +/** + * Creates grid node predicate evaluating on the given node ID. + */ +public class IgnitePredicateEqualsClusterNodeId implements IgnitePredicate { + /** */ + private static final long serialVersionUID = -7082730222779476623L; + + /** */ + private final UUID nodeId; + + /** + * @param nodeId (Collection) + */ + public IgnitePredicateEqualsClusterNodeId(UUID nodeId) { + this.nodeId = nodeId; + } + + /** {@inheritDoc} */ + @Override public boolean apply(ClusterNode e) { + return e.id().equals(nodeId); + } + + /** {@inheritDoc} */ + @Override public String toString() { + return S.toString(IgnitePredicateEqualsClusterNodeId.class, this); + } +} http://git-wip-us.apache.org/repos/asf/ignite/blob/9165b0d6/modules/core/src/main/java/org/apache/ignite/internal/util/lang/gridfunc/IgnitePredicateEqualsUUID.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/util/lang/gridfunc/IgnitePredicateEqualsUUID.java b/modules/core/src/main/java/org/apache/ignite/internal/util/lang/gridfunc/IgnitePredicateEqualsUUID.java new file mode 100644 index 0000000..326fe95 --- /dev/null +++ b/modules/core/src/main/java/org/apache/ignite/internal/util/lang/gridfunc/IgnitePredicateEqualsUUID.java @@ -0,0 +1,50 @@ +/* + * 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.gridfunc; + +import java.util.UUID; +import org.apache.ignite.internal.util.typedef.internal.S; +import org.apache.ignite.lang.IgnitePredicate; + +/** + * UUID equals predicate. + */ +public class IgnitePredicateEqualsUUID implements IgnitePredicate { + /** */ + private static final long serialVersionUID = -5664060422647374863L; + + /** */ + private final UUID nodeId; + + /** + * @param nodeId Node ID for which returning predicate will evaluate to {@code true}. + */ + public IgnitePredicateEqualsUUID(UUID nodeId) { + this.nodeId = nodeId; + } + + /** {@inheritDoc} */ + @Override public boolean apply(UUID id) { + return id.equals(nodeId); + } + + /** {@inheritDoc} */ + @Override public String toString() { + return S.toString(IgnitePredicateEqualsUUID.class, this); + } +} http://git-wip-us.apache.org/repos/asf/ignite/blob/9165b0d6/modules/core/src/main/java/org/apache/ignite/internal/util/lang/gridfunc/IgnitePredicateEvaluateEntryByKey.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/util/lang/gridfunc/IgnitePredicateEvaluateEntryByKey.java b/modules/core/src/main/java/org/apache/ignite/internal/util/lang/gridfunc/IgnitePredicateEvaluateEntryByKey.java new file mode 100644 index 0000000..a8eca85 --- /dev/null +++ b/modules/core/src/main/java/org/apache/ignite/internal/util/lang/gridfunc/IgnitePredicateEvaluateEntryByKey.java @@ -0,0 +1,53 @@ +/* + * 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.gridfunc; + +import java.util.Map; +import org.apache.ignite.internal.util.lang.GridFunc; +import org.apache.ignite.internal.util.typedef.internal.S; +import org.apache.ignite.lang.IgnitePredicate; + +/** + * Predicate evaluates to true for given value. + * Note that evaluation will be short-circuit when first predicate evaluated to false is found. + */ +public class IgnitePredicateEvaluateEntryByKey implements IgnitePredicate> { + /** */ + private static final long serialVersionUID = 0L; + + /** */ + private final IgnitePredicate[] predicates; + + /** + * @param predicates Optional set of predicates to use for filtration. If none provided - original map (or its copy) will be + * returned. + */ + public IgnitePredicateEvaluateEntryByKey(IgnitePredicate... predicates) { + this.predicates = predicates; + } + + /** {@inheritDoc} */ + @Override public boolean apply(Map.Entry e) { + return GridFunc.isAll(e.getKey(), predicates); + } + + /** {@inheritDoc} */ + @Override public String toString() { + return S.toString(IgnitePredicateEvaluateEntryByKey.class, this); + } +} http://git-wip-us.apache.org/repos/asf/ignite/blob/9165b0d6/modules/core/src/main/java/org/apache/ignite/internal/util/lang/gridfunc/IgnitePredicateEvaluateEntryByValue.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/util/lang/gridfunc/IgnitePredicateEvaluateEntryByValue.java b/modules/core/src/main/java/org/apache/ignite/internal/util/lang/gridfunc/IgnitePredicateEvaluateEntryByValue.java new file mode 100644 index 0000000..a082c4e --- /dev/null +++ b/modules/core/src/main/java/org/apache/ignite/internal/util/lang/gridfunc/IgnitePredicateEvaluateEntryByValue.java @@ -0,0 +1,53 @@ +/* + * 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.gridfunc; + +import java.util.Map; +import org.apache.ignite.internal.util.lang.GridFunc; +import org.apache.ignite.internal.util.typedef.internal.S; +import org.apache.ignite.lang.IgnitePredicate; + +/** + * Predicate evaluates to true for given value. + * Note that evaluation will be short-circuit when first predicate evaluated to false is found. + */ +public class IgnitePredicateEvaluateEntryByValue implements IgnitePredicate> { + /** */ + private static final long serialVersionUID = 0L; + + /** */ + private final IgnitePredicate[] predicates; + + /** + * @param predicates Optional set of predicates to use for filtration. If none provided - original map (or its copy) will be + * returned. + */ + public IgnitePredicateEvaluateEntryByValue(IgnitePredicate... predicates) { + this.predicates = predicates; + } + + /** {@inheritDoc} */ + @Override public boolean apply(Map.Entry e) { + return GridFunc.isAll(e.getValue(), predicates); + } + + /** {@inheritDoc} */ + @Override public String toString() { + return S.toString(IgnitePredicateEvaluateEntryByValue.class, this); + } +} http://git-wip-us.apache.org/repos/asf/ignite/blob/9165b0d6/modules/core/src/main/java/org/apache/ignite/internal/util/lang/gridfunc/IgnitePredicateHasEqualId.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/util/lang/gridfunc/IgnitePredicateHasEqualId.java b/modules/core/src/main/java/org/apache/ignite/internal/util/lang/gridfunc/IgnitePredicateHasEqualId.java new file mode 100644 index 0000000..6d23ce3 --- /dev/null +++ b/modules/core/src/main/java/org/apache/ignite/internal/util/lang/gridfunc/IgnitePredicateHasEqualId.java @@ -0,0 +1,51 @@ +/* + * 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.gridfunc; + +import java.util.UUID; +import org.apache.ignite.cluster.ClusterNode; +import org.apache.ignite.internal.util.typedef.internal.S; +import org.apache.ignite.lang.IgnitePredicate; + +/** + * {@link ClusterNode} has equal id predicate. + */ +public class IgnitePredicateHasEqualId implements IgnitePredicate { + /** */ + private static final long serialVersionUID = 0L; + + /** */ + private final UUID locNodeId; + + /** + * @param locNodeId Id for check. + */ + public IgnitePredicateHasEqualId(UUID locNodeId) { + this.locNodeId = locNodeId; + } + + /** {@inheritDoc} */ + @Override public boolean apply(T n) { + return n.id().equals(locNodeId); + } + + /** {@inheritDoc} */ + @Override public String toString() { + return S.toString(IgnitePredicateHasEqualId.class, this); + } +} http://git-wip-us.apache.org/repos/asf/ignite/blob/9165b0d6/modules/core/src/main/java/org/apache/ignite/internal/util/lang/gridfunc/IgnitePredicateHasNotEqualId.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/util/lang/gridfunc/IgnitePredicateHasNotEqualId.java b/modules/core/src/main/java/org/apache/ignite/internal/util/lang/gridfunc/IgnitePredicateHasNotEqualId.java new file mode 100644 index 0000000..2381515 --- /dev/null +++ b/modules/core/src/main/java/org/apache/ignite/internal/util/lang/gridfunc/IgnitePredicateHasNotEqualId.java @@ -0,0 +1,51 @@ +/* + * 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.gridfunc; + +import java.util.UUID; +import org.apache.ignite.cluster.ClusterNode; +import org.apache.ignite.internal.util.typedef.internal.S; +import org.apache.ignite.lang.IgnitePredicate; + +/** + * {@link ClusterNode} node has NOT equal id predicate. + */ +public class IgnitePredicateHasNotEqualId implements IgnitePredicate { + /** */ + private static final long serialVersionUID = 0L; + + /** */ + private final UUID locNodeId; + + /** + * @param locNodeId Id for check. + */ + public IgnitePredicateHasNotEqualId(UUID locNodeId) { + this.locNodeId = locNodeId; + } + + /** {@inheritDoc} */ + @Override public boolean apply(T n) { + return !n.id().equals(locNodeId); + } + + /** {@inheritDoc} */ + @Override public String toString() { + return S.toString(IgnitePredicateHasNotEqualId.class, this); + } +} http://git-wip-us.apache.org/repos/asf/ignite/blob/9165b0d6/modules/core/src/main/java/org/apache/ignite/internal/util/lang/gridfunc/IgnitePredicateIgniteFutureIsNotDone.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/util/lang/gridfunc/IgnitePredicateIgniteFutureIsNotDone.java b/modules/core/src/main/java/org/apache/ignite/internal/util/lang/gridfunc/IgnitePredicateIgniteFutureIsNotDone.java new file mode 100644 index 0000000..e5f3d21 --- /dev/null +++ b/modules/core/src/main/java/org/apache/ignite/internal/util/lang/gridfunc/IgnitePredicateIgniteFutureIsNotDone.java @@ -0,0 +1,40 @@ +/* + * 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.gridfunc; + +import org.apache.ignite.internal.IgniteInternalFuture; +import org.apache.ignite.internal.util.typedef.internal.S; +import org.apache.ignite.lang.IgnitePredicate; + +/** + * IgniteInternalFuture is not done predicate. + */ +public class IgnitePredicateIgniteFutureIsNotDone implements IgnitePredicate> { + /** */ + private static final long serialVersionUID = 0L; + + /** {@inheritDoc} */ + @Override public boolean apply(IgniteInternalFuture f) { + return !f.isDone(); + } + + /** {@inheritDoc} */ + @Override public String toString() { + return S.toString(IgnitePredicateIgniteFutureIsNotDone.class, this); + } +} http://git-wip-us.apache.org/repos/asf/ignite/blob/9165b0d6/modules/core/src/main/java/org/apache/ignite/internal/util/lang/gridfunc/IgnitePredicateIsAll.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/util/lang/gridfunc/IgnitePredicateIsAll.java b/modules/core/src/main/java/org/apache/ignite/internal/util/lang/gridfunc/IgnitePredicateIsAll.java new file mode 100644 index 0000000..8177d3e --- /dev/null +++ b/modules/core/src/main/java/org/apache/ignite/internal/util/lang/gridfunc/IgnitePredicateIsAll.java @@ -0,0 +1,52 @@ +/* + * 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.gridfunc; + +import org.apache.ignite.internal.util.lang.GridFunc; +import org.apache.ignite.internal.util.typedef.internal.S; +import org.apache.ignite.lang.IgnitePredicate; + +/** + * Predicate that evaluates to {@code true} if each of its component predicates evaluates to {@code true}. + * + * @param Type of the free variable, i.e. the element the predicate is called on. + */ +public class IgnitePredicateIsAll implements IgnitePredicate { + /** */ + private static final long serialVersionUID = 0L; + + /** */ + private final IgnitePredicate[] predicates; + + /** + * @param predicates Passed in predicate. If none provided - always-{@code false} predicate is returned. + */ + public IgnitePredicateIsAll(IgnitePredicate... predicates) { + this.predicates = predicates; + } + + /** {@inheritDoc} */ + @Override public boolean apply(T t) { + return GridFunc.isAll(t, predicates); + } + + /** {@inheritDoc} */ + @Override public String toString() { + return S.toString(IgnitePredicateIsAll.class, this); + } +} http://git-wip-us.apache.org/repos/asf/ignite/blob/9165b0d6/modules/core/src/main/java/org/apache/ignite/internal/util/lang/gridfunc/IgnitePredicateIsAssignableFrom.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/util/lang/gridfunc/IgnitePredicateIsAssignableFrom.java b/modules/core/src/main/java/org/apache/ignite/internal/util/lang/gridfunc/IgnitePredicateIsAssignableFrom.java new file mode 100644 index 0000000..a024d46 --- /dev/null +++ b/modules/core/src/main/java/org/apache/ignite/internal/util/lang/gridfunc/IgnitePredicateIsAssignableFrom.java @@ -0,0 +1,51 @@ +/* + * 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.gridfunc; + +import org.apache.ignite.internal.util.typedef.P1; +import org.apache.ignite.internal.util.typedef.internal.S; + +/** + * Predicate that evaluates to {@code true} if its free variable is instance of the given class. + * + * @param Type of the free variable, i.e. the element the predicate is called on. + */ +public class IgnitePredicateIsAssignableFrom implements P1 { + /** */ + private static final long serialVersionUID = 0L; + + /** */ + private final Class cls; + + /** + * @param cls Class to compare to. + */ + public IgnitePredicateIsAssignableFrom(Class cls) { + this.cls = cls; + } + + /** {@inheritDoc} */ + @Override public boolean apply(T t) { + return t != null && cls.isAssignableFrom(t.getClass()); + } + + /** {@inheritDoc} */ + @Override public String toString() { + return S.toString(IgnitePredicateIsAssignableFrom.class, this); + } +} http://git-wip-us.apache.org/repos/asf/ignite/blob/9165b0d6/modules/core/src/main/java/org/apache/ignite/internal/util/lang/gridfunc/IgnitePredicateIsNotAll.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/util/lang/gridfunc/IgnitePredicateIsNotAll.java b/modules/core/src/main/java/org/apache/ignite/internal/util/lang/gridfunc/IgnitePredicateIsNotAll.java new file mode 100644 index 0000000..51e19cd --- /dev/null +++ b/modules/core/src/main/java/org/apache/ignite/internal/util/lang/gridfunc/IgnitePredicateIsNotAll.java @@ -0,0 +1,52 @@ +/* + * 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.gridfunc; + +import org.apache.ignite.internal.util.lang.GridFunc; +import org.apache.ignite.internal.util.typedef.internal.S; +import org.apache.ignite.lang.IgnitePredicate; + +/** + * Negated predicate. + * + * @param Type of the free variable, i.e. the element the predicate is called on. + */ +public class IgnitePredicateIsNotAll implements IgnitePredicate { + /** */ + private static final long serialVersionUID = 0L; + + /** */ + private final IgnitePredicate[] predicates; + + /** + * @param predicates Predicate to negate. + */ + public IgnitePredicateIsNotAll(IgnitePredicate... predicates) { + this.predicates = predicates; + } + + /** {@inheritDoc} */ + @Override public boolean apply(T t) { + return !GridFunc.isAll(t, predicates); + } + + /** {@inheritDoc} */ + @Override public String toString() { + return S.toString(IgnitePredicateIsNotAll.class, this); + } +} http://git-wip-us.apache.org/repos/asf/ignite/blob/9165b0d6/modules/core/src/main/java/org/apache/ignite/internal/util/lang/gridfunc/IgnitePredicateIsNull.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/util/lang/gridfunc/IgnitePredicateIsNull.java b/modules/core/src/main/java/org/apache/ignite/internal/util/lang/gridfunc/IgnitePredicateIsNull.java new file mode 100644 index 0000000..499b554 --- /dev/null +++ b/modules/core/src/main/java/org/apache/ignite/internal/util/lang/gridfunc/IgnitePredicateIsNull.java @@ -0,0 +1,44 @@ +/* + * 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.gridfunc; + +import org.apache.ignite.internal.util.typedef.internal.S; +import org.apache.ignite.lang.IgnitePredicate; + +/** + * Defines a predicate which checks a parameter on null. + * + * @param Type of predicate parameter. + */ +public class IgnitePredicateIsNull implements IgnitePredicate { + /** */ + private static final long serialVersionUID = 0L; + + /** + * @param e Parameter for check. + * @return 'true' if parameter equals to null, otherwise 'false'. + */ + @Override public boolean apply(E e) { + return e == null; + } + + /** {@inheritDoc} */ + @Override public String toString() { + return S.toString(IgnitePredicateIsNull.class, this); + } +} http://git-wip-us.apache.org/repos/asf/ignite/blob/9165b0d6/modules/core/src/main/java/org/apache/ignite/internal/util/lang/gridfunc/IgnitePredicateNotContainWrapper.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/util/lang/gridfunc/IgnitePredicateNotContainWrapper.java b/modules/core/src/main/java/org/apache/ignite/internal/util/lang/gridfunc/IgnitePredicateNotContainWrapper.java new file mode 100644 index 0000000..0dc399d --- /dev/null +++ b/modules/core/src/main/java/org/apache/ignite/internal/util/lang/gridfunc/IgnitePredicateNotContainWrapper.java @@ -0,0 +1,54 @@ +/* + * 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.gridfunc; + +import java.util.Collection; +import org.apache.ignite.internal.util.typedef.internal.S; +import org.apache.ignite.lang.IgnitePredicate; + +/** + * Predicate that returns {@code true} if its free variable is not contained in given collection. + * + * @param Type of the free variable for the predicate and type of the collection elements. + */ +public class IgnitePredicateNotContainWrapper implements IgnitePredicate { + /** */ + private static final long serialVersionUID = 0L; + + /** */ + private final Collection c; + + /** + * @param c Collection to check for containment. + */ + public IgnitePredicateNotContainWrapper(Collection c) { + this.c = c; + } + + /** {@inheritDoc} */ + @Override public boolean apply(T t) { + assert c != null; + + return !c.contains(t); + } + + /** {@inheritDoc} */ + public String toString() { + return S.toString(IgnitePredicateNotContainWrapper.class, this); + } +} http://git-wip-us.apache.org/repos/asf/ignite/blob/9165b0d6/modules/core/src/main/java/org/apache/ignite/internal/util/lang/gridfunc/IgnitePredicateNotEqual.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/util/lang/gridfunc/IgnitePredicateNotEqual.java b/modules/core/src/main/java/org/apache/ignite/internal/util/lang/gridfunc/IgnitePredicateNotEqual.java new file mode 100644 index 0000000..31a165d --- /dev/null +++ b/modules/core/src/main/java/org/apache/ignite/internal/util/lang/gridfunc/IgnitePredicateNotEqual.java @@ -0,0 +1,53 @@ +/* + * 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.gridfunc; + +import org.apache.ignite.internal.util.lang.GridFunc; +import org.apache.ignite.internal.util.typedef.internal.S; +import org.apache.ignite.lang.IgnitePredicate; + +/** + * Predicate that evaluates to {@code true} if its free variable is equal to {@code target} or both are + * {@code null}. + * + * @param Type of the free variable, i.e. the element the predicate is called on. + */ +public class IgnitePredicateNotEqual implements IgnitePredicate { + /** */ + private static final long serialVersionUID = 0L; + + /** */ + private final T target; + + /** + * @param target Object to compare free variable to. + */ + public IgnitePredicateNotEqual(T target) { + this.target = target; + } + + /** {@inheritDoc} */ + @Override public boolean apply(T t) { + return !GridFunc.eq(t, target); + } + + /** {@inheritDoc} */ + @Override public String toString() { + return S.toString(IgnitePredicateNotEqual.class, this); + } +} http://git-wip-us.apache.org/repos/asf/ignite/blob/9165b0d6/modules/core/src/main/java/org/apache/ignite/internal/util/lang/gridfunc/IgnitePredicateNotNull.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/util/lang/gridfunc/IgnitePredicateNotNull.java b/modules/core/src/main/java/org/apache/ignite/internal/util/lang/gridfunc/IgnitePredicateNotNull.java new file mode 100644 index 0000000..840ab82 --- /dev/null +++ b/modules/core/src/main/java/org/apache/ignite/internal/util/lang/gridfunc/IgnitePredicateNotNull.java @@ -0,0 +1,44 @@ +/* + * 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.gridfunc; + +import org.apache.ignite.internal.util.typedef.internal.S; +import org.apache.ignite.lang.IgnitePredicate; + +/** + * Defines a predicate which checks a parameter on null. + * + * @param Type of predicate parameter. + */ +public class IgnitePredicateNotNull implements IgnitePredicate { + /** */ + private static final long serialVersionUID = 0L; + + /** + * @param e Parameter for check. + * @return 'true' if parameter NOT equals to null, otherwise 'false'. + */ + @Override public boolean apply(E e) { + return e != null; + } + + /** {@inheritDoc} */ + @Override public String toString() { + return S.toString(IgnitePredicateNotNull.class, this); + } +} http://git-wip-us.apache.org/repos/asf/ignite/blob/9165b0d6/modules/core/src/main/java/org/apache/ignite/internal/util/lang/gridfunc/IgniteReducerAlwaysTrue.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/util/lang/gridfunc/IgniteReducerAlwaysTrue.java b/modules/core/src/main/java/org/apache/ignite/internal/util/lang/gridfunc/IgniteReducerAlwaysTrue.java new file mode 100644 index 0000000..389e700 --- /dev/null +++ b/modules/core/src/main/java/org/apache/ignite/internal/util/lang/gridfunc/IgniteReducerAlwaysTrue.java @@ -0,0 +1,56 @@ +/* + * 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.gridfunc; + +import org.apache.ignite.internal.util.typedef.internal.S; +import org.apache.ignite.lang.IgniteReducer; + +/** + * Reducer which always returns {@code true} from {@link org.apache.ignite.lang.IgniteReducer#collect(Object)} + * + * @param Reducer element type. + */ +public class IgniteReducerAlwaysTrue implements IgniteReducer { + /** */ + private static final long serialVersionUID = 0L; + + /** */ + private final T elem; + + /** + * @param elem Element to return from {@link org.apache.ignite.lang.IgniteReducer#reduce()} method. + */ + public IgniteReducerAlwaysTrue(T elem) { + this.elem = elem; + } + + /** {@inheritDoc} */ + @Override public boolean collect(T e) { + return true; + } + + /** {@inheritDoc} */ + @Override public T reduce() { + return elem; + } + + /** {@inheritDoc} */ + @Override public String toString() { + return S.toString(IgniteReducerAlwaysTrue.class, this); + } +} http://git-wip-us.apache.org/repos/asf/ignite/blob/9165b0d6/modules/core/src/main/java/org/apache/ignite/internal/util/lang/gridfunc/IgniteReducerIntSum.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/util/lang/gridfunc/IgniteReducerIntSum.java b/modules/core/src/main/java/org/apache/ignite/internal/util/lang/gridfunc/IgniteReducerIntSum.java new file mode 100644 index 0000000..0b811a8 --- /dev/null +++ b/modules/core/src/main/java/org/apache/ignite/internal/util/lang/gridfunc/IgniteReducerIntSum.java @@ -0,0 +1,51 @@ +/* + * 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.gridfunc; + +import java.util.concurrent.atomic.AtomicInteger; +import org.apache.ignite.internal.util.typedef.internal.S; +import org.apache.ignite.lang.IgniteReducer; + +/** + * Reducer that calculates sum of integer elements. + */ +public class IgniteReducerIntSum implements IgniteReducer { + /** */ + private static final long serialVersionUID = 0L; + + /** */ + private AtomicInteger sum = new AtomicInteger(0); + + /** {@inheritDoc} */ + @Override public boolean collect(Integer e) { + if (e != null) + sum.addAndGet(e); + + return true; + } + + /** {@inheritDoc} */ + @Override public Integer reduce() { + return sum.get(); + } + + /** {@inheritDoc} */ + @Override public String toString() { + return S.toString(IgniteReducerIntSum.class, this); + } +} http://git-wip-us.apache.org/repos/asf/ignite/blob/9165b0d6/modules/core/src/main/java/org/apache/ignite/internal/util/lang/gridfunc/IgniteReducerLongSum.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/util/lang/gridfunc/IgniteReducerLongSum.java b/modules/core/src/main/java/org/apache/ignite/internal/util/lang/gridfunc/IgniteReducerLongSum.java new file mode 100644 index 0000000..a5b8f59 --- /dev/null +++ b/modules/core/src/main/java/org/apache/ignite/internal/util/lang/gridfunc/IgniteReducerLongSum.java @@ -0,0 +1,51 @@ +/* + * 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.gridfunc; + +import java.util.concurrent.atomic.AtomicLong; +import org.apache.ignite.internal.util.typedef.internal.S; +import org.apache.ignite.lang.IgniteReducer; + +/** + * Reducer that calculates sum of long integer elements. + */ +public class IgniteReducerLongSum implements IgniteReducer { + /** */ + private static final long serialVersionUID = 0L; + + /** */ + private AtomicLong sum = new AtomicLong(0); + + /** {@inheritDoc} */ + @Override public boolean collect(Long e) { + if (e != null) + sum.addAndGet(e); + + return true; + } + + /** {@inheritDoc} */ + @Override public Long reduce() { + return sum.get(); + } + + /** {@inheritDoc} */ + @Override public String toString() { + return S.toString(IgniteReducerLongSum.class, this); + } +} http://git-wip-us.apache.org/repos/asf/ignite/blob/9165b0d6/modules/core/src/main/java/org/apache/ignite/internal/util/lang/gridfunc/IgniteReducerStringConcat.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/util/lang/gridfunc/IgniteReducerStringConcat.java b/modules/core/src/main/java/org/apache/ignite/internal/util/lang/gridfunc/IgniteReducerStringConcat.java new file mode 100644 index 0000000..6f64747 --- /dev/null +++ b/modules/core/src/main/java/org/apache/ignite/internal/util/lang/gridfunc/IgniteReducerStringConcat.java @@ -0,0 +1,79 @@ +/* + * 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.gridfunc; + +import org.apache.ignite.internal.util.lang.GridFunc; +import org.apache.ignite.internal.util.typedef.internal.S; +import org.apache.ignite.internal.util.typedef.internal.SB; +import org.apache.ignite.lang.IgniteReducer; + +/** + * Reducer that concatenates strings using provided delimiter. + */ +public class IgniteReducerStringConcat implements IgniteReducer { + /** */ + private static final long serialVersionUID = 0L; + + /** */ + private final String delim; + + /** */ + private SB sb; + + /** */ + private boolean first; + + /** */ + private final Object lock; + + /** + * @param delim Delimiter (optional). + */ + public IgniteReducerStringConcat(String delim) { + this.delim = delim; + sb = new SB(); + first = true; + lock = new Object(); + } + + /** {@inheritDoc} */ + @Override public boolean collect(String s) { + synchronized (lock) { + if (!first && !GridFunc.isEmpty(delim)) + sb.a(delim); + + sb.a(s); + + first = false; + } + + return true; + } + + /** {@inheritDoc} */ + @Override public String reduce() { + synchronized (lock) { + return sb.toString(); + } + } + + /** {@inheritDoc} */ + @Override public String toString() { + return S.toString(IgniteReducerStringConcat.class, this); + } +} http://git-wip-us.apache.org/repos/asf/ignite/blob/9165b0d6/modules/core/src/main/java/org/apache/ignite/internal/util/lang/gridfunc/MultipleIterator.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/util/lang/gridfunc/MultipleIterator.java b/modules/core/src/main/java/org/apache/ignite/internal/util/lang/gridfunc/MultipleIterator.java new file mode 100644 index 0000000..c5930af --- /dev/null +++ b/modules/core/src/main/java/org/apache/ignite/internal/util/lang/gridfunc/MultipleIterator.java @@ -0,0 +1,106 @@ +/* + * 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.gridfunc; + +import java.io.Serializable; +import java.util.Iterator; +import java.util.NoSuchElementException; +import org.apache.ignite.internal.util.typedef.internal.S; + +/** + * Concatenates multiple iterators as single one. + * + * @param Elements type. + */ +public class MultipleIterator implements Iterator, Serializable { + /** */ + private static final long serialVersionUID = 0; + + /** */ + private final Iterator> iters; + + /** */ + private Iterator it; + + /** */ + private Iterator last; + + /** */ + private T next; + + /** + * @param iters Iterator over iterators. + */ + public MultipleIterator(Iterator> iters) { + this.iters = iters; + it = iters.next(); + advance(); + } + + /** */ + private void advance() { + for (; ; ) { + if (it.hasNext()) { + next = it.next(); + + assert next != null; + + return; + } + + if (!iters.hasNext()) + return; + + it = iters.next(); + } + } + + /** {@inheritDoc} */ + @Override public boolean hasNext() { + return next != null; + } + + /** {@inheritDoc} */ + @Override public T next() { + T res = next; + + if (res == null) + throw new NoSuchElementException(); + + next = null; + + last = it; + + advance(); + + return res; + } + + /** {@inheritDoc} */ + @Override public void remove() { + if (last == null) + throw new IllegalStateException(); + + last.remove(); + } + + /** {@inheritDoc} */ + @Override public String toString() { + return S.toString(MultipleIterator.class, this); + } +} http://git-wip-us.apache.org/repos/asf/ignite/blob/9165b0d6/modules/core/src/main/java/org/apache/ignite/internal/util/lang/gridfunc/package-info.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/util/lang/gridfunc/package-info.java b/modules/core/src/main/java/org/apache/ignite/internal/util/lang/gridfunc/package-info.java new file mode 100644 index 0000000..9361826 --- /dev/null +++ b/modules/core/src/main/java/org/apache/ignite/internal/util/lang/gridfunc/package-info.java @@ -0,0 +1,22 @@ +/* + * 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. + */ + +/** + * + * Contains utilities classes for {@link org.apache.ignite.internal.util.lang.GridFunc}. + */ +package org.apache.ignite.internal.util.lang.gridfunc; \ No newline at end of file