Interface Element

  • All Known Subinterfaces:
    Edge, Vertex, VertexProperty<V>

    public interface Element
    An Element is the base class for both Vertex and Edge. An Element has an identifier that must be unique to its inheriting classes (Vertex or Edge). An Element can maintain a collection of Property objects. Typically, objects are Java primitives (e.g. String, long, int, boolean, etc.)
    Marko A. Rodriguez (, Stephen Mallette (
    • Method Detail

      • id

        Object id()
        Gets the unique identifier for the graph Element.
        The id of the element
      • label

        String label()
        Gets the label for the graph Element which helps categorize it.
        The label of the element
      • graph

        Graph graph()
        Get the graph that this element is within.
        the graph of this element
      • keys

        default Set<String> keys()
        Get the keys of the properties associated with this element. The default implementation iterators the properties and stores the keys into a HashSet.
        The property key set
      • property

        <V> Property<V> property​(String key,
                                 V value)
        Add or set a property value for the Element given its key.
      • remove

        void remove()
        Removes the Element from the graph.
      • values

        default <V> Iterator<V> values​(String... propertyKeys)
        Get the values of properties as an Iterator.
      • properties

        <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. If no keys are provide then return all the properties.