Interface VertexSequence


  • public interface VertexSequence
    An ordered sequence of vertices which may contain duplicates.
    • Method Detail

      • create

        static VertexSequence create()
        Instantiate a new vertex sequence.
        Returns:
      • filter

        VertexSet filter​(java.util.function.Predicate<PgxVertex> predicate)
        Filter the vertices in the sequence by the given predicate.
        Parameters:
        predicate -
        Returns:
      • filter

        VertexSet filter​(VertexProperty<java.lang.Boolean> property)
        Filter the vertices in the sequence by the given boolean property.
        Parameters:
        property -
        Returns:
      • forEach

        void forEach​(java.util.function.Consumer<PgxVertex> callable)
        Run the callable for each vertex in the sequence in parallel.
        Parameters:
        callable -
      • forSequential

        void forSequential​(java.util.function.Consumer<PgxVertex> callable)
        Run the callable for each vertex in the sequence in sequence.
        Parameters:
        callable -
      • contains

        boolean contains​(PgxVertex v)
        Check if the sequence contains the given vertex.
        Parameters:
        v -
        Returns:
      • push

        void push​(PgxVertex v)
        Add a vertex to the sequence.
        Parameters:
        v -
      • pushFront

        void pushFront​(PgxVertex v)
        Add a vertex to the front of the sequence.
        Parameters:
        v -
      • pushBack

        void pushBack​(PgxVertex v)
        Add a vertex to the back of the sequence.
        Parameters:
        v -
      • pop

        PgxVertex pop()
        Remove and return a vertex from the sequence.
        Returns:
      • popFront

        PgxVertex popFront()
        Remove and return the vertex at the front of the sequence.
        Returns:
      • popBack

        PgxVertex popBack()
        Remove and return the vertex at the back of the sequence.
        Returns:
      • front

        PgxVertex front()
        Get the vertex at the front of the sequence.
        Returns:
      • back

        PgxVertex back()
        Get the vertex at the back of the sequence.
        Returns:
      • size

        int size()
        Get the number of vertices in the sequence.
        Returns:
      • clear

        void clear()
        Remove all vertices from the sequence.
      • clone

        default VertexSequence clone()
        Clone this vertex sequence.
        Returns: