public interface VertexSet
extends java.lang.Cloneable
Modifier and Type | Method and Description |
---|---|
void |
add(PgxVertex v)
Add the vertex to the set.
|
boolean |
allMatch(java.util.function.Predicate<PgxVertex> predicate)
Check if the predicate holds for all vertices in the set.
|
boolean |
anyMatch(java.util.function.Predicate<PgxVertex> predicate)
Check if the predicate holds for any vertex in the set.
|
<T extends java.lang.Number> |
avg(java.util.function.Function<PgxVertex,T> reducer)
Apply the reducer to each vertex in the set and compute the average.
|
void |
clear()
Remove all vertices from the set.
|
default VertexSet |
clone()
Clone this vertex set.
|
boolean |
contains(PgxVertex v)
Check if the set contains the given vertex.
|
static VertexSet |
create()
Instantiate a new vertex set.
|
VertexSet |
filter(java.util.function.Predicate<PgxVertex> predicate)
Filter the vertices in the set by the given predicate.
|
VertexSet |
filter(VertexProperty<java.lang.Boolean> property)
Filter the vertices in the set by the given boolean property.
|
void |
forEach(java.util.function.Consumer<PgxVertex> callable)
Run the callable for each vertex in the set in parallel.
|
void |
forSequential(java.util.function.Consumer<PgxVertex> callable)
Run the callable for each vertex in the set in sequence.
|
<T extends java.lang.Number> |
max(java.util.function.Function<PgxVertex,T> reducer)
Apply the reducer to each vertex in the set and compute the maximum.
|
VertexSet |
orderBy(java.util.function.Function<PgxVertex,java.lang.Number> transform, Order order)
Order the vertices in the set based on the result of the transformation function.
|
VertexSet |
orderBy(VertexProperty vertexProperty, Order order)
Order the vertices based on the value of the property.
|
void |
remove(PgxVertex v)
Remove the vertex from the set.
|
long |
size()
Get the number of vertices in the set.
|
<T extends java.lang.Number> |
sum(java.util.function.Function<PgxVertex,T> reducer)
Apply the reducer to each vertex in the set and sum the results.
|
<T extends java.lang.Number> |
sum(VertexProperty<T> reducer)
Get the property for each vertex in the set and sum the results.
|
void add(PgxVertex v)
v
-boolean allMatch(java.util.function.Predicate<PgxVertex> predicate)
predicate
-boolean anyMatch(java.util.function.Predicate<PgxVertex> predicate)
predicate
-<T extends java.lang.Number> T avg(java.util.function.Function<PgxVertex,T> reducer)
T
-reducer
-void clear()
default VertexSet clone()
boolean contains(PgxVertex v)
v
-static VertexSet create()
VertexSet filter(java.util.function.Predicate<PgxVertex> predicate)
predicate
-VertexSet filter(VertexProperty<java.lang.Boolean> property)
property
-void forEach(java.util.function.Consumer<PgxVertex> callable)
callable
-void forSequential(java.util.function.Consumer<PgxVertex> callable)
callable
-<T extends java.lang.Number> T max(java.util.function.Function<PgxVertex,T> reducer)
T
-reducer
-VertexSet orderBy(java.util.function.Function<PgxVertex,java.lang.Number> transform, Order order)
transform
-order
-VertexSet orderBy(VertexProperty vertexProperty, Order order)
vertexProperty
-order
-void remove(PgxVertex v)
v
-long size()
<T extends java.lang.Number> T sum(java.util.function.Function<PgxVertex,T> reducer)
T
-reducer
-<T extends java.lang.Number> T sum(VertexProperty<T> reducer)
T
-reducer
-