Class StarGraph.StarEdge

java.lang.Object
org.apache.tinkerpop.gremlin.structure.util.star.StarGraph.StarElement<Edge>
org.apache.tinkerpop.gremlin.structure.util.star.StarGraph.StarEdge
All Implemented Interfaces:
Edge, Element, Attachable<Edge>
Direct Known Subclasses:
StarGraph.StarInEdge, StarGraph.StarOutEdge
Enclosing class:
StarGraph

public abstract class StarGraph.StarEdge extends StarGraph.StarElement<Edge> implements Edge
  • Field Details

    • otherId

      protected final Object otherId
  • Method Details

    • labels

      public Set<String> labels()
      Description copied from interface: Element
      Gets all labels for this element.

      For Vertex: may return zero or more labels (multi-label support). For Edge: returns a singleton set (single label only in TinkerGraph). For VertexProperty: returns a singleton set containing the property key.

      Specified by:
      labels in interface Element
      Returns:
      An unmodifiable Set of labels; may be empty for vertices with no labels
    • 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
      Overrides:
      label in class StarGraph.StarElement<Edge>
      Returns:
      The label of the element
    • setLabels

      public void setLabels(Set<String> labels)
      Sets the edge labels from a source set. Used when copying labels from a multi-label edge.
    • 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
    • properties

      public <V> Iterator<Property<V>> properties(String... propertyKeys)
      Description copied from interface: Edge
      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 Edge
      Specified by:
      properties in interface Element
    • vertices

      public Iterator<Vertex> vertices(Direction direction)
      Description copied from interface: Edge
      Retrieve the vertex (or vertices) associated with this edge as defined by the direction. If the direction is Direction.BOTH then the iterator order is: Direction.OUT then Direction.IN.
      Specified by:
      vertices in interface Edge
      Parameters:
      direction - Get the incoming vertex, outgoing vertex, or both vertices
      Returns:
      An iterator with 1 or 2 vertices
    • remove

      public void remove()
      Description copied from interface: Element
      Removes the Element from the graph.
      Specified by:
      remove in interface Element
    • toString

      public String toString()
      Overrides:
      toString in class Object