Show / Hide Table of Contents

    Class Path

    A Path denotes a particular walk through a graph as defined by a .

    Inheritance
    System.Object
    Path
    Implements
    System.Collections.Generic.IReadOnlyList<System.Object>
    System.Collections.Generic.IReadOnlyCollection<System.Object>
    System.Collections.Generic.IEnumerable<System.Object>
    System.Collections.IEnumerable
    System.IEquatable<Path>
    Inherited Members
    System.Object.Equals(System.Object, System.Object)
    System.Object.GetType()
    System.Object.MemberwiseClone()
    System.Object.ReferenceEquals(System.Object, System.Object)
    Namespace: Gremlin.Net.Structure
    Assembly: cs.temp.dll.dll
    Syntax
    public class Path : IReadOnlyList<object>, IReadOnlyCollection<object>, IEnumerable<object>, IEnumerable, IEquatable<Path>
    Remarks

    In abstraction, any Path implementation maintains two lists: a list of sets of labels and a list of objects. The list of labels are the labels of the steps traversed. The list of objects are the objects traversed.

    Constructors

    Path(IList<ISet<String>>, IList<Object>)

    Initializes a new instance of the Path class.

    Declaration
    public Path(IList<ISet<string>> labels, IList<object> objects)
    Parameters
    Type Name Description
    System.Collections.Generic.IList<ISet<System.String>> labels

    The labels associated with the path

    System.Collections.Generic.IList<System.Object> objects

    The objects in the Path.

    Properties

    Count

    Gets the number of steps in the path.

    Declaration
    public int Count { get; }
    Property Value
    Type Description
    System.Int32

    Item[Int32]

    Get the object associated with the specified index into the path.

    Declaration
    public dynamic this[int index] { get; }
    Parameters
    Type Name Description
    System.Int32 index

    The index of the path

    Property Value
    Type Description
    System.Object

    The object associated with the index of the path

    Item[String]

    Gets the object associated with the particular label of the path.

    Declaration
    public object this[string label] { get; }
    Parameters
    Type Name Description
    System.String label

    The label of the path

    Property Value
    Type Description
    System.Object

    The object associated with the label of the path

    Remarks

    If the path has multiple labels of the type, then get a collection of those objects.

    Exceptions
    Type Condition
    System.Collections.Generic.KeyNotFoundException

    Thrown if the path does not contain the label.

    Labels

    Gets an ordered list of the labels associated with the Path.

    Declaration
    public IList<ISet<string>> Labels { get; }
    Property Value
    Type Description
    System.Collections.Generic.IList<ISet<System.String>>

    Objects

    Gets an ordered list of the objects in the Path.

    Declaration
    public IList<object> Objects { get; }
    Property Value
    Type Description
    System.Collections.Generic.IList<System.Object>

    Methods

    ContainsKey(String)

    Returns true if the path has the specified label, else return false.

    Declaration
    public bool ContainsKey(string key)
    Parameters
    Type Name Description
    System.String key

    The label to search for.

    Returns
    Type Description
    System.Boolean

    True if the label exists in the path.

    Equals(Path)

    Declaration
    public bool Equals(Path other)
    Parameters
    Type Name Description
    Path other
    Returns
    Type Description
    System.Boolean

    Equals(Object)

    Declaration
    public override bool Equals(object obj)
    Parameters
    Type Name Description
    System.Object obj
    Returns
    Type Description
    System.Boolean
    Overrides
    System.Object.Equals(System.Object)

    GetEnumerator()

    Declaration
    public IEnumerator<object> GetEnumerator()
    Returns
    Type Description
    System.Collections.Generic.IEnumerator<System.Object>

    GetHashCode()

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    System.Int32
    Overrides
    System.Object.GetHashCode()

    ToString()

    Declaration
    public override string ToString()
    Returns
    Type Description
    System.String
    Overrides
    System.Object.ToString()

    TryGetValue(String, out Object)

    Tries to get the object associated with the particular label of the path.

    Declaration
    public bool TryGetValue(string label, out object value)
    Parameters
    Type Name Description
    System.String label

    The label of the path.

    System.Object value

    The object associated with the label of the path.

    Returns
    Type Description
    System.Boolean

    True, if an object was found for the label.

    Remarks

    If the path has multiple labels of the type, then get a collection of those objects.

    Implements

    System.Collections.Generic.IReadOnlyList<T>
    System.Collections.Generic.IReadOnlyCollection<T>
    System.Collections.Generic.IEnumerable<T>
    System.Collections.IEnumerable
    System.IEquatable<T>
    Back to top Copyright © 2018 The Apache Software Foundation