org.apache.tinkerpop.gremlin.structure.util.reference

## Class ReferenceEdge

- java.lang.Object
- - org.apache.tinkerpop.gremlin.structure.util.reference.ReferenceElement<Edge>
  - - org.apache.tinkerpop.gremlin.structure.util.reference.ReferenceEdge

- All Implemented Interfaces:
    Serializable, Edge, Element, Attachable<Edge>

      public class ReferenceEdge
      extends ReferenceElement<Edge>
      implements Edge

  Author:
    Marko A. Rodriguez (http://markorodriguez.com)
  See Also:
    Serialized Form

- - ### Nested Class Summary

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

      `Edge.Exceptions`

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

      `Attachable.Exceptions, Attachable.Method`

  - ### Field Summary

    - ### Fields inherited from class org.apache.tinkerpop.gremlin.structure.util.reference.ReferenceElement

      `id, label`

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

      `DEFAULT_LABEL`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ReferenceEdge(Edge edge)`
    `ReferenceEdge(Object id, String label, ReferenceVertex inVertex, ReferenceVertex outVertex)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `Vertex` | `inVertex()` Get the incoming/head vertex of this edge.
    `Vertex` | `outVertex()` Get the outgoing/tail vertex of this edge.
    `<V> Iterator<Property<V>>` | `properties(String... propertyKeys)` Get an `Iterator` of properties where the `propertyKeys` is meant to be a filter on the available keys.
    `<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.structure.util.reference.ReferenceElement

      `equals, get, graph, hashCode, id, label`

    - ### 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, label, property, value, values`

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

      `attach`

- - ### Constructor Detail

    - #### ReferenceEdge

          public ReferenceEdge(Edge edge)

    - #### ReferenceEdge

          public ReferenceEdge(Object id,
                               String label,
                               ReferenceVertex inVertex,
                               ReferenceVertex outVertex)

  - ### Method Detail

    - #### 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`

    - #### remove

          public void remove()

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

    - #### 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

    - #### 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

    - #### 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

    - #### properties

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

      Description copied from interface: `Edge`
      Get an `Iterator` of properties where the `propertyKeys` is meant to be a filter on the available keys. If no keys are provide then return all the properties.
      Specified by:
        `properties` in interface `Edge`
      Specified by:
        `properties` in interface `Element`

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

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