org.apache.tinkerpop.gremlin.process.computer.util

## Class ComputerGraph.ComputerElement

- java.lang.Object
- - org.apache.tinkerpop.gremlin.process.computer.util.ComputerGraph.ComputerElement

- All Implemented Interfaces:
    Element, WrappedElement<Element>
  Direct Known Subclasses:
    ComputerGraph.ComputerEdge, ComputerGraph.ComputerVertex, ComputerGraph.ComputerVertexProperty
  Enclosing class:
    ComputerGraph

      public class ComputerGraph.ComputerElement
      extends Object
      implements Element, WrappedElement<Element>

- - ### Nested Class Summary

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

      `Element.Exceptions`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ComputerElement(Element element)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `equals(Object other)`
    `Element` | `getBaseElement()`
    `Graph` | `graph()` Get the graph that this element is within.
    `int` | `hashCode()`
    `Object` | `id()` Gets the unique identifier for the graph `Element`.
    `Set<String>` | `keys()` Get the keys of the properties associated with this element.
    `String` | `label()` Gets the label for the graph `Element` which helps categorize it.
    `<V> Iterator<? extends 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)` Get a `Property` for the `Element` given its key.
    `<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()`
    `<V> V` | `value(String key)` Get the value of a `Property` given it's key.
    `<V> Iterator<V>` | `values(String... propertyKeys)` Get the values of properties as an `Iterator`.

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

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

- - ### Constructor Detail

    - #### ComputerElement

          public ComputerElement(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

    - #### keys

          public Set<String> keys()

      Description copied from interface: `Element`
      Get the keys of the properties associated with this element. The default implementation iterators the properties and stores the keys into a `HashSet`.
      Specified by:
        `keys` in interface `Element`
      Returns:
        The property key set

    - #### property

          public <V> Property<V> property(String key)

      Description copied from interface: `Element`
      Get a `Property` for the `Element` given its key. The default implementation calls the raw `Element.properties(java.lang.String...)`.
      Specified by:
        `property` in interface `Element`

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

    - #### value

          public <V> V value(String key)
                      throws NoSuchElementException

      Description copied from interface: `Element`
      Get the value of a `Property` given it's key. The default implementation calls `Element.property(java.lang.String)` and then returns the associated value.
      Specified by:
        `value` in interface `Element`
      Throws:
        `NoSuchElementException` - if the property does not exist on the `Element`.

    - #### remove

          public void remove()

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

    - #### properties

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

      Description copied from interface: `Element`
      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`

    - #### values

          public <V> Iterator<V> values(String... propertyKeys)

      Description copied from interface: `Element`
      Get the values of properties as an `Iterator`.
      Specified by:
        `values` in interface `Element`

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `Object`

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

    - #### equals

          public boolean equals(Object other)

      Overrides:
        `equals` in class `Object`

    - #### getBaseElement

          public Element getBaseElement()

      Specified by:
        `getBaseElement` in interface `WrappedElement<Element>`

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