public class RandomNodeSelector extends Object implements NodeSelector
NodeSelector that selects a Node at random from all Nodes available in the database that match
the provided NodeInclusionPolicy.| Constructor and Description |
|---|
RandomNodeSelector()
Constructs a new
RandomNodeSelector that selects any node which isn't a framework-internal node. |
RandomNodeSelector(NodeInclusionPolicy inclusionPolicy)
Constructs a new
RandomNodeSelector that selects a random node that matches the given
NodeInclusionPolicy. |
| Modifier and Type | Method and Description |
|---|---|
org.neo4j.graphdb.Node |
selectNode(org.neo4j.graphdb.GraphDatabaseService database)
Select a node from the graph.
|
public RandomNodeSelector()
RandomNodeSelector that selects any node which isn't a framework-internal node.public RandomNodeSelector(NodeInclusionPolicy inclusionPolicy)
RandomNodeSelector that selects a random node that matches the given
NodeInclusionPolicy.inclusionPolicy - The NodeInclusionPolicy to consider when selecting
nodes.public org.neo4j.graphdb.Node selectNode(org.neo4j.graphdb.GraphDatabaseService database)
selectNode in interface NodeSelectordatabase - in which to select a node.Node in the given database, null if a node can't be selected for whatever
reason, perhaps because there is no (matching) node in the database.Copyright © 2013-2016–2018 Graph Aware Limited. All rights reserved.