Package oracle.pgx.algorithm
Interface EdgeSequence
-
public interface EdgeSequence
An 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 PgxVertex
back()
Get the edge at the back of the sequence.void
clear()
Remove all edges from the sequence.default VertexSequence
clone()
Clone this vertex sequence.boolean
contains(PgxEdge e)
Check if the sequence contains the given edge.static EdgeSequence
create()
Instantiate a new edge sequence.EdgeSequence
filter(java.util.function.Predicate<PgxEdge> predicate)
Filter the edges in the sequence by the given predicate.EdgeSequence
filter(EdgeProperty<java.lang.Boolean> property)
Filter the edges in the sequence by the given boolean property.void
forEach(java.util.function.Consumer<PgxEdge> callable)
Run the callable for each edge in the sequence in parallel.void
forSequential(java.util.function.Consumer<PgxEdge> callable)
Run the callable for each edge in the sequence in sequence.PgxEdge
front()
Get the edge at the front of the sequence.PgxEdge
pop()
Remove and return an edge from the sequence.PgxEdge
popBack()
Remove and return the edge at the back of the sequence.PgxEdge
popFront()
Remove and return the edge at the front of the sequence.void
push(PgxEdge e)
Add an edge to the sequence.void
pushBack(PgxEdge e)
Add an edge to the back of the sequence.void
pushFront(PgxEdge e)
Add an edge to the front of the sequence.int
size()
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:
-
-