Package oracle.pgx.algorithm
Interface VertexSequence
-
public interface VertexSequenceAn ordered sequence of vertices which may contain duplicates.
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description PgxVertexback()Get the vertex at the back of the sequence.voidclear()Remove all vertices from the sequence.default VertexSequenceclone()Clone this vertex sequence.booleancontains(PgxVertex v)Check if the sequence contains the given vertex.static VertexSequencecreate()Instantiate a new vertex sequence.VertexSetfilter(java.util.function.Predicate<PgxVertex> predicate)Filter the vertices in the sequence by the given predicate.VertexSetfilter(VertexProperty<java.lang.Boolean> property)Filter the vertices in the sequence by the given boolean property.voidforEach(java.util.function.Consumer<PgxVertex> callable)Run the callable for each vertex in the sequence in parallel.voidforSequential(java.util.function.Consumer<PgxVertex> callable)Run the callable for each vertex in the sequence in sequence.PgxVertexfront()Get the vertex at the front of the sequence.PgxVertexpop()Remove and return a vertex from the sequence.PgxVertexpopBack()Remove and return the vertex at the back of the sequence.PgxVertexpopFront()Remove and return the vertex at the front of the sequence.voidpush(PgxVertex v)Add a vertex to the sequence.voidpushBack(PgxVertex v)Add a vertex to the back of the sequence.voidpushFront(PgxVertex v)Add a vertex to the front of the sequence.intsize()Get the number of vertices in the sequence.
-
-
-
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:
-
-