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

## Class ReferenceVertexProperty<V>

- java.lang.Object
- - org.apache.tinkerpop.gremlin.structure.util.reference.ReferenceElement<VertexProperty<V>>
  - - org.apache.tinkerpop.gremlin.structure.util.reference.ReferenceVertexProperty<V>

- All Implemented Interfaces:
    Serializable, Element, Property<V>, Attachable<VertexProperty<V>>, VertexProperty<V>

      public class ReferenceVertexProperty<V>
      extends ReferenceElement<VertexProperty<V>>
      implements VertexProperty<V>

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

      `VertexProperty.Cardinality, VertexProperty.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.VertexProperty

      `DEFAULT_LABEL`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ReferenceVertexProperty(Object id, String label, V value)`
    `ReferenceVertexProperty(VertexProperty<V> vertexProperty)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `Vertex` | `element()` Gets the `Vertex` that owns this `VertexProperty`.
    `boolean` | `isPresent()` Whether the property is empty or not.
    `String` | `key()` The key of the property.
    `String` | `label()` Gets the label for the graph `Element` which helps categorize it.
    `<U> Iterator<Property<U>>` | `properties(String... propertyKeys)` Get an `Iterator` of properties where the `propertyKeys` is meant to be a filter on the available keys.
    `<U> Property<U>` | `property(String key, U value)` Add or set a property value for the `Element` given its key.
    `void` | `remove()` Remove the property from the associated element.
    `String` | `toString()`
    `V` | `value()` The value of the property.

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

      `equals, get, graph, hashCode, id`

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

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

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

      `empty, graph`

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

      `ifPresent, orElse, orElseGet, orElseThrow`

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

      `id, keys, property, value, values`

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

      `attach`

- - ### Constructor Detail

    - #### ReferenceVertexProperty

          public ReferenceVertexProperty(VertexProperty<V> vertexProperty)

    - #### ReferenceVertexProperty

          public ReferenceVertexProperty(Object id,
                                         String label,
                                         V value)

  - ### Method Detail

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

    - #### key

          public String key()

      Description copied from interface: `Property`
      The key of the property.
      Specified by:
        `key` in interface `Property<V>`
      Returns:
        The property key

    - #### 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`
      Specified by:
        `label` in interface `VertexProperty<V>`
      Overrides:
        `label` in class `ReferenceElement<VertexProperty<V>>`
      Returns:
        The label of the element

    - #### value

          public V value()
                  throws NoSuchElementException

      Description copied from interface: `Property`
      The value of the property.
      Specified by:
        `value` in interface `Property<V>`
      Returns:
        The property value
      Throws:
        `NoSuchElementException` - thrown if the property is empty

    - #### isPresent

          public boolean isPresent()

      Description copied from interface: `Property`
      Whether the property is empty or not.
      Specified by:
        `isPresent` in interface `Property<V>`
      Returns:
        True if the property exists, else false

    - #### element

          public Vertex element()

      Description copied from interface: `VertexProperty`
      Gets the `Vertex` that owns this `VertexProperty`.
      Specified by:
        `element` in interface `Property<V>`
      Specified by:
        `element` in interface `VertexProperty<V>`
      Returns:
        The element associated with this property (i.e. `Vertex`, `Edge`, or `VertexProperty`).

    - #### property

          public <U> Property<U> property(String key,
                                          U 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: `Property`
      Remove the property from the associated element.
      Specified by:
        `remove` in interface `Element`
      Specified by:
        `remove` in interface `Property<V>`

    - #### properties

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

      Description copied from interface: `VertexProperty`
      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 `Element`
      Specified by:
        `properties` in interface `VertexProperty<V>`

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