Search Results for

    Show / Hide Table of Contents

    Interface ITraversal<TStart, TEnd>

    A traversal represents a directed walk over a graph.

    Inherited Members
    ITraversal.Bytecode
    ITraversal.IsAnonymous
    ITraversal.Traversers
    IEnumerator<TEnd>.Current
    IEnumerator.MoveNext()
    IEnumerator.Reset()
    IDisposable.Dispose()
    Namespace: Gremlin.Net.Process.Traversal
    Assembly: Gremlin.Net.dll
    Syntax
    public interface ITraversal<TStart, TEnd> : ITraversal, IEnumerator<TEnd?>, IEnumerator, IDisposable
    Type Parameters
    Name Description
    TStart
    TEnd

    Methods

    HasNext()

    Determines if the traversal contains any additional results for iteration.

    Declaration
    bool HasNext()
    Returns
    Type Description
    bool

    True if there are more results and false otherwise.

    Iterate()

    Iterates all Traverser instances in the traversal.

    Declaration
    ITraversal<TStart, TEnd> Iterate()
    Returns
    Type Description
    ITraversal<TStart, TEnd>

    The fully drained traversal.

    Next()

    Gets the next result from the traversal.

    Declaration
    TEnd? Next()
    Returns
    Type Description
    TEnd

    The result.

    Next(int)

    Gets the next n-number of results from the traversal.

    Declaration
    IEnumerable<TEnd?> Next(int amount)
    Parameters
    Type Name Description
    int amount

    The number of results to get.

    Returns
    Type Description
    IEnumerable<TEnd>

    The n-results.

    NextTraverser()

    Gets the next Traverser.

    Declaration
    Traverser NextTraverser()
    Returns
    Type Description
    Traverser

    The next Traverser.

    Promise<TReturn>(Func<ITraversal<TStart, TEnd>, TReturn>, CancellationToken)

    Starts a promise to execute a function on the current traversal that will be completed in the future.

    Declaration
    Task<TReturn> Promise<TReturn>(Func<ITraversal<TStart, TEnd>, TReturn> callback, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    Func<ITraversal<TStart, TEnd>, TReturn> callback

    The function to execute on the current traversal.

    CancellationToken cancellationToken

    The token to cancel the operation. The default value is None.

    Returns
    Type Description
    Task<TReturn>

    The result of the executed callback.

    Type Parameters
    Name Description
    TReturn

    The return type of the callback.

    ToList()

    Puts all the results into a IList<T>.

    Declaration
    IList<TEnd?> ToList()
    Returns
    Type Description
    IList<TEnd>

    The results in a list.

    ToSet()

    Puts all the results into a ISet<T>.

    Declaration
    ISet<TEnd?> ToSet()
    Returns
    Type Description
    ISet<TEnd>

    The results in a set.

    In this article
    Back to top Copyright © 2018 The Apache Software Foundation