Search Results for

    Show / Hide Table of Contents

    Interface ITraversal<S, E>

    A traversal represents a directed walk over a graph.

    Inherited Members
    ITraversal.Bytecode
    ITraversal.IsAnonymous
    ITraversal.Traversers
    System.Collections.Generic.IEnumerator<E>.Current
    System.IDisposable.Dispose()
    System.Collections.IEnumerator.MoveNext()
    System.Collections.IEnumerator.Reset()
    Namespace: Gremlin.Net.Process.Traversal
    Assembly: cs.temp.dll.dll
    Syntax
    public interface ITraversal<S, E> : ITraversal, IEnumerator, IEnumerator<E>, IDisposable, IEnumerator
    Type Parameters
    Name Description
    S
    E

    Methods

    HasNext()

    Determines if the traversal contains any additional results for iteration.

    Declaration
    bool HasNext()
    Returns
    Type Description
    System.Boolean

    True if there are more results and false otherwise.

    Iterate()

    Iterates all Traverser instances in the traversal.

    Declaration
    ITraversal<S, E> Iterate()
    Returns
    Type Description
    ITraversal<S, E>

    The fully drained traversal.

    Next()

    Gets the next result from the traversal.

    Declaration
    E Next()
    Returns
    Type Description
    E

    The result.

    Next(Int32)

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

    Declaration
    IEnumerable<E> Next(int amount)
    Parameters
    Type Name Description
    System.Int32 amount

    The number of results to get.

    Returns
    Type Description
    System.Collections.Generic.IEnumerable<E>

    The n-results.

    NextTraverser()

    Gets the next Traverser.

    Declaration
    Traverser NextTraverser()
    Returns
    Type Description
    Traverser

    The next Traverser.

    Promise<TReturn>(Func<ITraversal<S, E>, 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<S, E>, TReturn> callback, CancellationToken cancellationToken = null)
    Parameters
    Type Name Description
    System.Func<ITraversal<S, E>, 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
    System.Threading.Tasks.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 System.Collections.Generic.IList<T>.

    Declaration
    IList<E> ToList()
    Returns
    Type Description
    System.Collections.Generic.IList<E>

    The results in a list.

    ToSet()

    Puts all the results into a System.Collections.Generic.ISet<T>.

    Declaration
    ISet<E> ToSet()
    Returns
    Type Description
    System.Collections.Generic.ISet<E>

    The results in a set.

    In This Article
    Back to top Copyright © 2018 The Apache Software Foundation