org.apache.tinkerpop.gremlin.neo4j.structure

## Class Neo4jEdge

- java.lang.Object
- - org.apache.tinkerpop.gremlin.neo4j.structure.Neo4jElement
  - - org.apache.tinkerpop.gremlin.neo4j.structure.Neo4jEdge

- All Implemented Interfaces:
    Edge, Element, WrappedEdge<Neo4jRelationship>, WrappedElement<Neo4jEntity>

      public final class Neo4jEdge
      extends Neo4jElement
      implements Edge, WrappedEdge<Neo4jRelationship>

  Author:
    Stephen Mallette (http://stephen.genoprime.com)

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from interface org.apache.tinkerpop.gremlin.structure.Edge

      `Edge.Exceptions`

  - ### Field Summary

    - ### Fields inherited from class org.apache.tinkerpop.gremlin.neo4j.structure.Neo4jElement

      `baseElement, graph`

    - ### Fields inherited from interface org.apache.tinkerpop.gremlin.structure.Edge

      `DEFAULT_LABEL`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `Neo4jEdge(Neo4jRelationship relationship, Neo4jGraph graph)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `Neo4jRelationship` | `getBaseEdge()`
    `Vertex` | `inVertex()` Get the incoming/head vertex of this edge.
    `String` | `label()` Gets the label for the graph `Element` which helps categorize it.
    `Vertex` | `outVertex()` Get the outgoing/tail vertex of this edge.
    `<V> Iterator<Property<V>>` | `properties(String... propertyKeys)` Get an `Iterator` of properties.
    `<V> Property<V>` | `property(String key)` Get a `Property` for the `Element` given its key.
    `<V> Property<V>` | `property(String key, V value)` Add or set a property value for the `Element` given its key.
    `void` | `remove()` Removes the `Element` from the graph.
    `String` | `toString()`
    `Iterator<Vertex>` | `vertices(Direction direction)` Retrieve the vertex (or vertices) associated with this edge as defined by the direction.

    - ### Methods inherited from class org.apache.tinkerpop.gremlin.neo4j.structure.Neo4jElement

      `equals, getBaseElement, graph, hashCode, id, keys`

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

    - ### Methods inherited from interface org.apache.tinkerpop.gremlin.structure.Edge

      `bothVertices`

    - ### Methods inherited from interface org.apache.tinkerpop.gremlin.structure.Element

      `graph, id, keys, value, values`

- - ### Constructor Detail

    - #### Neo4jEdge

          public Neo4jEdge(Neo4jRelationship relationship,
                           Neo4jGraph graph)

  - ### Method Detail

    - #### outVertex

          public Vertex outVertex()

      Description copied from interface: `Edge`
      Get the outgoing/tail vertex of this edge.
      Specified by:
        `outVertex` in interface `Edge`
      Returns:
        the outgoing vertex of the edge

    - #### inVertex

          public Vertex inVertex()

      Description copied from interface: `Edge`
      Get the incoming/head vertex of this edge.
      Specified by:
        `inVertex` in interface `Edge`
      Returns:
        the incoming vertex of the edge

    - #### vertices

          public Iterator<Vertex> vertices(Direction direction)

      Description copied from interface: `Edge`
      Retrieve the vertex (or vertices) associated with this edge as defined by the direction. If the direction is `Direction.BOTH` then the iterator order is: `Direction.OUT` then `Direction.IN`.
      Specified by:
        `vertices` in interface `Edge`
      Parameters:
        `direction` - Get the incoming vertex, outgoing vertex, or both vertices
      Returns:
        An iterator with 1 or 2 vertices

    - #### remove

          public void remove()

      Description copied from interface: `Element`
      Removes the `Element` from the graph.
      Specified by:
        `remove` in interface `Element`

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

    - #### label

          public String label()

      Description copied from interface: `Element`
      Gets the label for the graph `Element` which helps categorize it.
      Specified by:
        `label` in interface `Element`
      Returns:
        The label of the element

    - #### getBaseEdge

          public Neo4jRelationship getBaseEdge()

      Specified by:
        `getBaseEdge` in interface `WrappedEdge<Neo4jRelationship>`

    - #### properties

          public <V> Iterator<Property<V>> properties(String... propertyKeys)

      Description copied from interface: `Edge`
      Get an `Iterator` of properties.
      Specified by:
        `properties` in interface `Edge`
      Specified by:
        `properties` in interface `Element`

    - #### property

          public <V> Property<V> property(String key)

      Description copied from interface: `Element`
      Get a `Property` for the `Element` given its key. The default implementation calls the raw `Element.properties(java.lang.String...)`.
      Specified by:
        `property` in interface `Element`

    - #### property

          public <V> Property<V> property(String key,
                                          V value)

      Description copied from interface: `Element`
      Add or set a property value for the `Element` given its key.
      Specified by:
        `property` in interface `Element`

Copyright © 2013–2018 Apache Software Foundation. All rights reserved.