org.opencypher.gremlin.client.CypherResultSet Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of cypher-gremlin-server-client Show documentation
Show all versions of cypher-gremlin-server-client Show documentation
Gremlin Server client wrapper that can send Cypher queries to a Cypher-enabled Gremlin Server
The newest version!
/*
* Copyright (c) 2018-2019 "Neo4j, Inc." [https://neo4j.com]
*
* 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.opencypher.gremlin.client;
import static java.util.Spliterator.IMMUTABLE;
import static java.util.Spliterator.NONNULL;
import static java.util.Spliterators.spliteratorUnknownSize;
import static java.util.stream.Collectors.toList;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Spliterator;
import java.util.function.Function;
import java.util.stream.Stream;
import java.util.stream.StreamSupport;
import org.apache.tinkerpop.gremlin.driver.Result;
/**
* A Gremlin query result iterator wrapper.
*
* In the case of most {@link CypherGremlinClient} configurations,
* instances of this class wrap a Gremlin {@link org.apache.tinkerpop.gremlin.driver.ResultSet} iterator,
* so this class is not thread-safe, by extension.
*
* @see CypherGremlinClient
*/
public final class CypherResultSet implements Iterable