Package oracle.pgx.algorithm
Interface EdgeSequence
-
public interface EdgeSequenceAn ordered sequence of edges which may contain duplicates.
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description PgxVertexback()Get the edge at the back of the sequence.voidclear()Remove all edges from the sequence.default VertexSequenceclone()Clone this vertex sequence.booleancontains(PgxEdge e)Check if the sequence contains the given edge.static EdgeSequencecreate()Instantiate a new edge sequence.EdgeSequencefilter(java.util.function.Predicate<PgxEdge> predicate)Filter the edges in the sequence by the given predicate.EdgeSequencefilter(EdgeProperty<java.lang.Boolean> property)Filter the edges in the sequence by the given boolean property.voidforEach(java.util.function.Consumer<PgxEdge> callable)Run the callable for each edge in the sequence in parallel.voidforSequential(java.util.function.Consumer<PgxEdge> callable)Run the callable for each edge in the sequence in sequence.PgxEdgefront()Get the edge at the front of the sequence.PgxEdgepop()Remove and return an edge from the sequence.PgxEdgepopBack()Remove and return the edge at the back of the sequence.PgxEdgepopFront()Remove and return the edge at the front of the sequence.voidpush(PgxEdge e)Add an edge to the sequence.voidpushBack(PgxEdge e)Add an edge to the back of the sequence.voidpushFront(PgxEdge e)Add an edge to the front of the sequence.intsize()Get the number of edges in the sequence.
-
-
-
Method Detail
-
create
static EdgeSequence create()
Instantiate a new edge sequence.- Returns:
-
filter
EdgeSequence filter(java.util.function.Predicate<PgxEdge> predicate)
Filter the edges in the sequence by the given predicate.- Parameters:
predicate-- Returns:
-
filter
EdgeSequence filter(EdgeProperty<java.lang.Boolean> property)
Filter the edges in the sequence by the given boolean property.- Parameters:
property-- Returns:
-
forEach
void forEach(java.util.function.Consumer<PgxEdge> callable)
Run the callable for each edge in the sequence in parallel.- Parameters:
callable-
-
forSequential
void forSequential(java.util.function.Consumer<PgxEdge> callable)
Run the callable for each edge in the sequence in sequence.- Parameters:
callable-
-
push
void push(PgxEdge e)
Add an edge to the sequence.- Parameters:
e-
-
pushFront
void pushFront(PgxEdge e)
Add an edge to the front of the sequence.- Parameters:
e-
-
pushBack
void pushBack(PgxEdge e)
Add an edge to the back of the sequence.- Parameters:
e-
-
contains
boolean contains(PgxEdge e)
Check if the sequence contains the given edge.- Parameters:
e-- Returns:
-
pop
PgxEdge pop()
Remove and return an edge from the sequence.- Returns:
-
popFront
PgxEdge popFront()
Remove and return the edge at the front of the sequence.- Returns:
-
popBack
PgxEdge popBack()
Remove and return the edge at the back of the sequence.- Returns:
-
front
PgxEdge front()
Get the edge at the front of the sequence.- Returns:
-
back
PgxVertex back()
Get the edge at the back of the sequence.- Returns:
-
size
int size()
Get the number of edges in the sequence.- Returns:
-
clear
void clear()
Remove all edges from the sequence.
-
clone
default VertexSequence clone()
Clone this vertex sequence.- Returns:
-
-