Class PgxVertex<ID>

  • Type Parameters:
    ID - the vertex ID type

    public class PgxVertex<ID>
    extends PgxEntity<ID>
    A vertex of a PgxGraph.
    • Method Detail

      • getLabelsAsync

        public PgxFuture<java.util.Set<java.lang.String>> getLabelsAsync()
        Gets the labels
        Returns:
        the vertex labels.
        Throws:
        java.lang.IllegalStateException - if no labels exist.
      • getOutNeighborsAsync

        public PgxFuture<java.util.Collection<PgxVertex<ID>>> getOutNeighborsAsync()
        Returns all outgoing neighbors of this vertex, i.e., all nodes this vertex has an edge to. If the graph is a multi-graph and if the vertex has multiple edges to a vertex 'A', then 'A' will appear multiple times in the result, i.e., once per edge to 'A'. This method does not guarantee any ordering in the result. This method never returns null.
      • getInNeighborsAsync

        public PgxFuture<java.util.Collection<PgxVertex<ID>>> getInNeighborsAsync()
        Returns all incoming neighbors of this vertex, i.e., all vertices that have an edge to this vertex. If the graph is a multi-graph and if a vertex 'A' has multiple edges to this vertex, then 'A' will appear multiple times in the result, i.e. once per edge from 'A' to this vertex. This method does not guarantee any ordering in the result. This method never returns null.
      • getNeighborsAsync

        public PgxFuture<java.util.Collection<PgxVertex<ID>>> getNeighborsAsync​(Direction direction,
                                                                                boolean removeDuplicates)
        Returns all neighbors of this vertex, i.e., all vertices that are connected to this vertex.
        Parameters:
        removeDuplicates - If removeDuplicates is set to true, the resulting collection does not contain any duplicates. Otherwise, if this vertex is connected 'N' times to a vertex 'X', vertex 'X' also appears 'N' times in the results. This method does not guarantee any ordering in the result. This method never returns null.
      • getDegree

        public long getDegree()
        Convenience method that calls getOutDegree().
      • getOutEdgesAsync

        public PgxFuture<java.util.Collection<PgxEdge>> getOutEdgesAsync()
        Returns all outgoing edges of this vertex. This method does not guarantee any ordering in the result. This method never returns null.
      • getInEdgesAsync

        public PgxFuture<java.util.Collection<PgxEdge>> getInEdgesAsync()
        Returns all incoming edges of this vertex. This method does not guarantee any ordering in the result. This method never returns null.
      • getInDegreeAsync

        public PgxFuture<java.lang.Long> getInDegreeAsync()
        Returns the inDegree of this vertex, i.e., the number of incoming edges of this vertex.
      • getOutDegreeAsync

        public PgxFuture<java.lang.Long> getOutDegreeAsync()
        Returns the outDegree of this vertex, i.e., the number of outgoing edges of this vertex.