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

## Class ReferenceElement<E extends Element>

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

- All Implemented Interfaces:
    Serializable, Element, Attachable<E>
  Direct Known Subclasses:
    ReferenceEdge, ReferenceVertex, ReferenceVertexProperty

      public abstract class ReferenceElement<E extends Element>
      extends Object
      implements Element, Serializable, Attachable<E>

  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.Element

      `Element.Exceptions`

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

      `Attachable.Exceptions, Attachable.Method`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected Object` | `id`
    `protected String` | `label`

  - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `ReferenceElement()`
    `` | `ReferenceElement(Element element)`
    `protected` | `ReferenceElement(Object id, String label)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `equals(Object other)`
    `E` | `get()` Get the raw object trying to be attached.
    `Graph` | `graph()` Get the graph that this element is within.
    `int` | `hashCode()`
    `Object` | `id()` Gets the unique identifier for the graph `Element`.
    `String` | `label()` Gets the label for the graph `Element` which helps categorize it.

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

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

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

      `keys, properties, property, property, remove, value, values`

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

      `attach`

- - ### Field Detail

    - #### id

          protected Object id

    - #### label

          protected String label

  - ### Constructor Detail

    - #### ReferenceElement

          protected ReferenceElement()

    - #### ReferenceElement

          protected ReferenceElement(Object id,
                                     String label)

    - #### ReferenceElement

          public ReferenceElement(Element element)

  - ### Method Detail

    - #### id

          public Object id()

      Description copied from interface: `Element`
      Gets the unique identifier for the graph `Element`.
      Specified by:
        `id` in interface `Element`
      Returns:
        The id of the element

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

    - #### graph

          public Graph graph()

      Description copied from interface: `Element`
      Get the graph that this element is within.
      Specified by:
        `graph` in interface `Element`
      Returns:
        the graph of this element

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `Object`

    - #### equals

          public boolean equals(Object other)

      Overrides:
        `equals` in class `Object`

    - #### get

          public E get()

      Description copied from interface: `Attachable`
      Get the raw object trying to be attached.
      Specified by:
        `get` in interface `Attachable<E extends Element>`
      Returns:
        the raw object to attach

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