org.apache.tinkerpop.gremlin.structure

## Interface VertexProperty<V>

- All Superinterfaces:
    Element, Property<V>

      public interface VertexProperty<V>
      extends Property<V>, Element

  A `VertexProperty` is similar to a `Property` in that it denotes a key/value pair associated with an `Vertex`, however it is different in the sense that it also represents an entity that it is an `Element` that can have properties of its own.

  A property is much like a Java8 `Optional` in that a property can be not present (i.e. empty). The key of a property is always a String and the value of a property is an arbitrary Java object. Each underlying graph engine will typically have constraints on what Java objects are allowed to be used as values.
  Author:
    Matthias Broecheler (me@matthiasb.com), Marko A. Rodriguez (http://markorodriguez.com), Stephen Mallette (http://stephen.genoprime.com)

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Interface and Description
    --- | ---
    `static class` | `VertexProperty.Cardinality`
    `static class` | `VertexProperty.Exceptions` Common exceptions to use with a property.

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static String` | `DEFAULT_LABEL`

  - ### Method Summary

    All Methods Static Methods Instance Methods Abstract Methods Default Methods
    Modifier and Type | Method and Description
    --- | ---
    `Vertex` | `element()` Gets the `Vertex` that owns this `VertexProperty`.
    `static <V> VertexProperty<V>` | `empty()` Constructs an empty `VertexProperty`.
    `default Graph` | `graph()` Get the graph that this element is within.
    `default 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.

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

      `ifPresent, isPresent, key, orElse, orElseGet, orElseThrow, remove, value`

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

      `id, keys, property, property, remove, value, values`

- - ### Field Detail

    - #### DEFAULT_LABEL

          static final String DEFAULT_LABEL

      See Also:
        Constant Field Values

  - ### Method Detail

    - #### element

          Vertex element()

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

    - #### graph

          default Graph graph()

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

    - #### label

          default String label()

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

    - #### empty

          static <V> VertexProperty<V> empty()

      Constructs an empty `VertexProperty`.
      Specified by:
        `empty` in interface `Property<V>`
      Type Parameters:
        `V` - The value class of the empty property
      Returns:
        A property that is not present

    - #### properties

          <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. If no keys are provide then return all the properties.
      Specified by:
        `properties` in interface `Element`

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