org.apache.tinkerpop.gremlin.structure.util.detached

## Class DetachedVertexProperty<V>

- java.lang.Object
- - org.apache.tinkerpop.gremlin.structure.util.detached.DetachedElement<VertexProperty<V>>
  - - org.apache.tinkerpop.gremlin.structure.util.detached.DetachedVertexProperty<V>

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

      public class DetachedVertexProperty<V>
      extends DetachedElement<VertexProperty<V>>
      implements VertexProperty<V>

  Author:
    Marko A. Rodriguez (http://markorodriguez.com), Stephen Mallette (http://stephen.genoprime.com)
  See Also:
    Serialized Form

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `DetachedVertexProperty.Builder`

    - ### 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
    Modifier and Type | Field and Description
    --- | ---
    `protected V` | `value`
    `protected DetachedVertex` | `vertex`

    - ### Fields inherited from class org.apache.tinkerpop.gremlin.structure.util.detached.DetachedElement

      `id, label, properties`

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

      `DEFAULT_LABEL`

  - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `` | `DetachedVertexProperty(Object id, String label, V value, Map<String,Object> properties)` This constructor is used by GraphSON when deserializing and the `Host` is not known.
    `` | `DetachedVertexProperty(Object id, String label, V value, Map<String,Object> properties, Vertex vertex)`
    `protected` | `DetachedVertexProperty(VertexProperty<V> vertexProperty, boolean withProperties)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static DetachedVertexProperty.Builder` | `build()` Provides a way to construct an immutable `DetachedEdge`.
    `Vertex` | `element()` Gets the `Vertex` that owns this `VertexProperty`.
    `boolean` | `equals(Object object)`
    `void` | `internalSetVertex(DetachedVertex vertex)`
    `boolean` | `isPresent()` Whether the property is empty or not.
    `String` | `key()` The key of the property.
    `<U> Iterator<Property<U>>` | `properties(String... propertyKeys)` Get an `Iterator` of properties.
    `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.detached.DetachedElement

      `get, graph, hashCode, id, label, property, property`

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

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

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

      `attach`

- - ### Field Detail

    - #### value

          protected V value

    - #### vertex

          protected transient DetachedVertex vertex

  - ### Constructor Detail

    - #### DetachedVertexProperty

          protected DetachedVertexProperty(VertexProperty<V> vertexProperty,
                                           boolean withProperties)

    - #### DetachedVertexProperty

          public DetachedVertexProperty(Object id,
                                        String label,
                                        V value,
                                        Map<String,Object> properties,
                                        Vertex vertex)

    - #### DetachedVertexProperty

          public DetachedVertexProperty(Object id,
                                        String label,
                                        V value,
                                        Map<String,Object> properties)

      This constructor is used by GraphSON when deserializing and the `Host` is not known.

  - ### Method Detail

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

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

    - #### value

          public V value()

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

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

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

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

    - #### equals

          public boolean equals(Object object)

      Overrides:
        `equals` in class `DetachedElement<VertexProperty<V>>`

    - #### properties

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

      Description copied from interface: `Element`
      Get an `Iterator` of properties.
      Specified by:
        `properties` in interface `Element`
      Specified by:
        `properties` in interface `VertexProperty<V>`
      Overrides:
        `properties` in class `DetachedElement<VertexProperty<V>>`

    - #### internalSetVertex

          public void internalSetVertex(DetachedVertex vertex)

    - #### build

          public static DetachedVertexProperty.Builder build()

      Provides a way to construct an immutable `DetachedEdge`.

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