diff --git a/community/common/src/main/java/org/neo4j/function/Predicate.java b/community/common/src/main/java/org/neo4j/function/Predicate.java deleted file mode 100644 index b5f25479dd7d8..0000000000000 --- a/community/common/src/main/java/org/neo4j/function/Predicate.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (c) 2002-2016 "Neo Technology," - * Network Engine for Objects in Lund AB [http://neotechnology.com] - * - * This file is part of Neo4j. - * - * Neo4j is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package org.neo4j.function; - -/** - * Please do not use this interface but use {@link java.util.function.Predicate} instead. - * The only reason for this interface to be here is because cypher-compiler-2.3 needs it. - */ -@Deprecated -public interface Predicate extends ThrowingPredicate -{ - boolean test( T t ); -} diff --git a/community/common/src/main/java/org/neo4j/function/Supplier.java b/community/common/src/main/java/org/neo4j/function/Supplier.java deleted file mode 100644 index 6fa05ea2d7459..0000000000000 --- a/community/common/src/main/java/org/neo4j/function/Supplier.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (c) 2002-2016 "Neo Technology," - * Network Engine for Objects in Lund AB [http://neotechnology.com] - * - * This file is part of Neo4j. - * - * Neo4j is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package org.neo4j.function; - -/** - * Please do not use this interface but use {@link java.util.function.Supplier} instead. - * The only reason for this interface to be here is because cypher-compiler-{2.3,3.0} needs it - * when generating compile runtimes. - */ -@Deprecated -public interface Supplier extends java.util.function.Supplier -{ -} diff --git a/community/cypher/cypher/src/main/scala/org/neo4j/cypher/internal/spi/v2_3/GeneratedQueryStructure.scala b/community/cypher/cypher/src/main/scala/org/neo4j/cypher/internal/spi/v2_3/GeneratedQueryStructure.scala index 1a9f8302f29bb..d8dbf4be91089 100644 --- a/community/cypher/cypher/src/main/scala/org/neo4j/cypher/internal/spi/v2_3/GeneratedQueryStructure.scala +++ b/community/cypher/cypher/src/main/scala/org/neo4j/cypher/internal/spi/v2_3/GeneratedQueryStructure.scala @@ -71,7 +71,7 @@ object GeneratedQueryStructure extends CodeStructure[GeneratedQuery] { ro = clazz.field(typeRef[ReadOperations], "ro"), nodeManager = clazz.field(typeRef[NodeManager], "nodeManager"), executionMode = clazz.field(typeRef[ExecutionMode], "executionMode"), - description = clazz.field(typeRef[org.neo4j.function.Supplier[InternalPlanDescription]], "description"), + description = clazz.field(typeRef[java.util.function.Supplier[InternalPlanDescription]], "description"), tracer = clazz.field(typeRef[QueryExecutionTracer], "tracer"), params = clazz.field(typeRef[util.Map[String, Object]], "params"), closeable = clazz.field(typeRef[SuccessfulCloseable], "closeable"), @@ -115,7 +115,7 @@ object GeneratedQueryStructure extends CodeStructure[GeneratedQuery] { param[Statement]("statement"), param[NodeManager]("nodeManager"), param[ExecutionMode]("executionMode"), - param[org.neo4j.function.Supplier[InternalPlanDescription]]("description"), + param[java.util.function.Supplier[InternalPlanDescription]]("description"), param[QueryExecutionTracer]("tracer"), param[util.Map[String, Object]]("params"))) { execute => execute.returns(Expression.invoke(Expression.newInstance(execution), MethodReference.constructorReference(execution, @@ -123,7 +123,7 @@ object GeneratedQueryStructure extends CodeStructure[GeneratedQuery] { typeRef[Statement], typeRef[NodeManager], typeRef[ExecutionMode], - typeRef[org.neo4j.function.Supplier[InternalPlanDescription]], + typeRef[java.util.function.Supplier[InternalPlanDescription]], typeRef[QueryExecutionTracer], typeRef[util.Map[String, Object]]), execute.load("closer"), @@ -847,13 +847,13 @@ private object Templates { param[Statement]("statement"), param[NodeManager]("nodeManager"), param[ExecutionMode]("executionMode"), - param[org.neo4j.function.Supplier[InternalPlanDescription]]("description"), + param[java.util.function.Supplier[InternalPlanDescription]]("description"), param[QueryExecutionTracer]("tracer"), param[util.Map[String, Object]]("params")). put(self(), typeRef[TaskCloser], "closer", load("closer")). put(self(), typeRef[ReadOperations], "ro", invoke(load("statement"), method[Statement, ReadOperations]("readOperations"))). put(self(), typeRef[ExecutionMode], "executionMode", load("executionMode")). - put(self(), typeRef[org.neo4j.function.Supplier[InternalPlanDescription]], "description", load("description")). + put(self(), typeRef[java.util.function.Supplier[InternalPlanDescription]], "description", load("description")). put(self(), typeRef[QueryExecutionTracer], "tracer", load("tracer")). put(self(), typeRef[util.Map[String, Object]], "params", load("params")). put(self(), typeRef[NodeManager], "nodeManager", load("nodeManager")). @@ -873,7 +873,7 @@ private object Templates { returns(get(self(), typeRef[ExecutionMode], "executionMode")). build() val EXECUTION_PLAN_DESCRIPTION = MethodTemplate.method(typeRef[InternalPlanDescription], "executionPlanDescription"). - returns(invoke(get(self(), typeRef[org.neo4j.function.Supplier[InternalPlanDescription]], "description"), method[org.neo4j.function.Supplier[InternalPlanDescription], InternalPlanDescription]("get"))). + returns(invoke(get(self(), typeRef[java.util.function.Supplier[InternalPlanDescription]], "description"), method[java.util.function.Supplier[InternalPlanDescription], InternalPlanDescription]("get"))). build() val JAVA_COLUMNS = MethodTemplate.method(typeRef[util.List[String]], "javaColumns"). returns(get(typeRef[util.List[String]], "COLUMNS")). diff --git a/community/graphdb-api/src/main/java/org/neo4j/graphdb/traversal/AbstractSelectorOrderer.java b/community/graphdb-api/src/main/java/org/neo4j/graphdb/impl/traversal/AbstractSelectorOrderer.java similarity index 86% rename from community/graphdb-api/src/main/java/org/neo4j/graphdb/traversal/AbstractSelectorOrderer.java rename to community/graphdb-api/src/main/java/org/neo4j/graphdb/impl/traversal/AbstractSelectorOrderer.java index c530aaa0122b3..cd03968945a54 100644 --- a/community/graphdb-api/src/main/java/org/neo4j/graphdb/traversal/AbstractSelectorOrderer.java +++ b/community/graphdb-api/src/main/java/org/neo4j/graphdb/impl/traversal/AbstractSelectorOrderer.java @@ -17,24 +17,17 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package org.neo4j.graphdb.traversal; +package org.neo4j.graphdb.impl.traversal; import org.neo4j.graphdb.Direction; +import org.neo4j.graphdb.traversal.BranchSelector; +import org.neo4j.graphdb.traversal.SideSelector; +import org.neo4j.graphdb.traversal.TraversalBranch; +import org.neo4j.graphdb.traversal.TraversalContext; -/** - * @deprecated This will be moved to internal packages in the next major release. - */ -@Deprecated public abstract class AbstractSelectorOrderer implements SideSelector { - private static final BranchSelector EMPTY_SELECTOR = new BranchSelector() - { - @Override - public TraversalBranch next( TraversalContext metadata ) - { - return null; - } - }; + private static final BranchSelector EMPTY_SELECTOR = metadata -> null; private final BranchSelector[] selectors; @SuppressWarnings( "unchecked" ) @@ -97,8 +90,7 @@ private TraversalBranch nextBranchFromSelector( TraversalContext metadata, protected BranchSelector nextSelector() { selectorIndex = (selectorIndex+1)%2; - BranchSelector selector = selectors[selectorIndex]; - return selector; + return selectors[selectorIndex]; } @Override diff --git a/community/graphdb-api/src/main/java/org/neo4j/graphdb/traversal/AlternatingSelectorOrderer.java b/community/graphdb-api/src/main/java/org/neo4j/graphdb/traversal/AlternatingSelectorOrderer.java index 7021a1b8c48ab..e6744814ecf94 100644 --- a/community/graphdb-api/src/main/java/org/neo4j/graphdb/traversal/AlternatingSelectorOrderer.java +++ b/community/graphdb-api/src/main/java/org/neo4j/graphdb/traversal/AlternatingSelectorOrderer.java @@ -19,6 +19,8 @@ */ package org.neo4j.graphdb.traversal; +import org.neo4j.graphdb.impl.traversal.AbstractSelectorOrderer; + public class AlternatingSelectorOrderer extends AbstractSelectorOrderer { public AlternatingSelectorOrderer( BranchSelector startSelector, BranchSelector endSelector ) diff --git a/community/graphdb-api/src/main/java/org/neo4j/graphdb/traversal/LevelSelectorOrderer.java b/community/graphdb-api/src/main/java/org/neo4j/graphdb/traversal/LevelSelectorOrderer.java index 79aef5fcc2ef1..19e96898eb590 100644 --- a/community/graphdb-api/src/main/java/org/neo4j/graphdb/traversal/LevelSelectorOrderer.java +++ b/community/graphdb-api/src/main/java/org/neo4j/graphdb/traversal/LevelSelectorOrderer.java @@ -22,6 +22,7 @@ import java.util.concurrent.atomic.AtomicInteger; import org.neo4j.graphdb.Direction; +import org.neo4j.graphdb.impl.traversal.AbstractSelectorOrderer; public class LevelSelectorOrderer extends AbstractSelectorOrderer {