File tree Expand file tree Collapse file tree 1 file changed +0
-22
lines changed
x-pack/plugin/esql-core/src/main/java/org/elasticsearch/xpack/esql/core/tree Expand file tree Collapse file tree 1 file changed +0
-22
lines changed Original file line number Diff line number Diff line change 1414import java .util .Iterator ;
1515import java .util .List ;
1616import java .util .Objects ;
17- import java .util .function .BiConsumer ;
1817import java .util .function .Consumer ;
1918import java .util .function .Function ;
2019import java .util .function .Predicate ;
@@ -95,27 +94,6 @@ public <E extends T> void forEachUp(Class<E> typeToken, Consumer<? super E> acti
9594 });
9695 }
9796
98- /**
99- * Executes the action on every parent of the specified typeToken.
100- *
101- * @param typeToken the type of the node to search for
102- * @param action the action to execute for each parent of the specified typeToken
103- */
104- @ SuppressWarnings ("unchecked" )
105- public <E extends T > E forEachParent (Class <E > typeToken , BiConsumer <E , ? super T > action ) {
106- if (typeToken .isInstance (this )) {
107- return (E ) this ;
108- }
109- for (Node <T > child : children ()) {
110- E foundMatchingChild = child .forEachParent (typeToken , action );
111- if (foundMatchingChild != null ) {
112- action .accept (foundMatchingChild , (T ) this );
113- return foundMatchingChild ;
114- }
115- }
116- return null ;
117- }
118-
11997 public <E > void forEachPropertyOnly (Class <E > typeToken , Consumer <? super E > rule ) {
12098 forEachProperty (typeToken , rule );
12199 }
You can’t perform that action at this time.
0 commit comments