public abstract class Evaluators extends Object
Evaluators useful during common traversals.Evaluator,
TraversalDescription| Constructor and Description |
|---|
Evaluators() |
| Modifier and Type | Method and Description |
|---|---|
static PathEvaluator |
all() |
static PathEvaluator |
atDepth(int depth)
Returns an
Evaluator which only includes positions at depth
and prunes everything deeper than that. |
static PathEvaluator |
endNodeIs(Evaluation evaluationIfMatch,
Evaluation evaluationIfNoMatch,
Node... possibleEndNodes)
An
Evaluator which will return evaluationIfMatch if Path.endNode()
for a given path is any of nodes, else evaluationIfNoMatch. |
static PathEvaluator |
excludeStartPosition() |
static PathEvaluator |
fromDepth(int depth)
Returns an
Evaluator which only includes positions from depth
and deeper and never prunes anything. |
static PathEvaluator |
includeIfAcceptedByAny(Evaluator... evaluators)
Whereas adding
Evaluators to a TraversalDescription puts those
evaluators in AND-mode this can group many evaluators in OR-mode. |
static PathEvaluator |
includeIfAcceptedByAny(PathEvaluator... evaluators)
Whereas adding
Evaluators to a TraversalDescription puts those
evaluators in AND-mode this can group many evaluators in OR-mode. |
static PathEvaluator |
includeIfContainsAll(Node... nodes)
Evaluator which decides to include a
Path if all the
nodes exist in it. |
static PathEvaluator |
includeWhereEndNodeIs(Node... nodes)
Include paths with the specified end nodes.
|
static PathEvaluator |
includeWhereLastRelationshipTypeIs(RelationshipType type,
RelationshipType... orAnyOfTheseTypes) |
static PathEvaluator |
includingDepths(int minDepth,
int maxDepth)
|
static PathEvaluator |
lastRelationshipTypeIs(Evaluation evaluationIfMatch,
Evaluation evaluationIfNoMatch,
RelationshipType type,
RelationshipType... orAnyOfTheseTypes)
|
static PathEvaluator |
pruneWhereEndNodeIs(Node... nodes) |
static PathEvaluator |
pruneWhereLastRelationshipTypeIs(RelationshipType type,
RelationshipType... orAnyOfTheseTypes) |
static Evaluator |
returnWhereEndNodeIs(Node... nodes)
Deprecated.
|
static Evaluator |
returnWhereLastRelationshipTypeIs(RelationshipType type,
RelationshipType... orAnyOfTheseTypes)
|
static PathEvaluator |
toDepth(int depth)
Returns an
Evaluator which includes positions down to depth
and prunes everything deeper than that. |
public static PathEvaluator all()
public static PathEvaluator excludeStartPosition()
public static PathEvaluator toDepth(int depth)
Evaluator which includes positions down to depth
and prunes everything deeper than that.depth - the max depth to traverse to.Evaluator which includes positions down to
depth and prunes everything deeper than that.public static PathEvaluator fromDepth(int depth)
Evaluator which only includes positions from depth
and deeper and never prunes anything.depth - the depth to start include positions from.Evaluator which only includes positions from
depth and deeper and never prunes anything.public static PathEvaluator atDepth(int depth)
Evaluator which only includes positions at depth
and prunes everything deeper than that.depth - the depth to start include positions from.Evaluator which only includes positions at
depth and prunes everything deeper than that.public static PathEvaluator includingDepths(int minDepth, int maxDepth)
Evaluator which only includes positions between
depths minDepth and maxDepth. It prunes everything deeper
than maxDepth.minDepth - minimum depth a position must have to be included.maxDepth - maximum depth a position must have to be included.Evaluator which only includes positions between
depths minDepth and maxDepth. It prunes everything deeper
than maxDepth.public static PathEvaluator lastRelationshipTypeIs(Evaluation evaluationIfMatch, Evaluation evaluationIfNoMatch, RelationshipType type, RelationshipType... orAnyOfTheseTypes)
Evaluator which compares the type of the last relationship
in a Path to a given set of relationship types (one or more).If the type of
the last relationship in a path is of one of the given types then
evaluationIfMatch will be returned, otherwise
evaluationIfNoMatch will be returned.evaluationIfMatch - the Evaluation to return if the type of the
last relationship in the path matches any of the given types.evaluationIfNoMatch - the Evaluation to return if the type of the
last relationship in the path doesn't match any of the given types.type - the (first) type (of possibly many) to match the last relationship
in paths with.orAnyOfTheseTypes - additional types to match the last relationship in
paths with.Evaluator which compares the type of the last relationship
in a Path to a given set of relationship types.public static Evaluator returnWhereLastRelationshipTypeIs(RelationshipType type, RelationshipType... orAnyOfTheseTypes)
public static PathEvaluator includeWhereLastRelationshipTypeIs(RelationshipType type, RelationshipType... orAnyOfTheseTypes)
type - the (first) type (of possibly many) to match the last relationship
in paths with.orAnyOfTheseTypes - types to match the last relationship in paths with. If any matches
it's considered a match.Evaluator which compares the type of the last relationship
in a Path to a given set of relationship types.Uses {@link Evaluation#INCLUDE_AND_CONTINUE} for {@code evaluationIfMatch}
and {@link Evaluation#EXCLUDE_AND_CONTINUE} for {@code evaluationIfNoMatch}.public static PathEvaluator pruneWhereLastRelationshipTypeIs(RelationshipType type, RelationshipType... orAnyOfTheseTypes)
type - the (first) type (of possibly many) to match the last relationship
in paths with.orAnyOfTheseTypes - types to match the last relationship in paths with. If any matches
it's considered a match.Evaluator which compares the type of the last relationship
in a Path to a given set of relationship types.Uses {@link Evaluation#INCLUDE_AND_PRUNE} for {@code evaluationIfMatch}
and {@link Evaluation#INCLUDE_AND_CONTINUE} for {@code evaluationIfNoMatch}.public static PathEvaluator endNodeIs(Evaluation evaluationIfMatch, Evaluation evaluationIfNoMatch, Node... possibleEndNodes)
Evaluator which will return evaluationIfMatch if Path.endNode()
for a given path is any of nodes, else evaluationIfNoMatch.evaluationIfMatch - the Evaluation to return if the Path.endNode()
is any of the nodes in nodes.evaluationIfNoMatch - the Evaluation to return if the Path.endNode()
doesn't match any of the nodes in nodes.possibleEndNodes - a set of nodes to match to end nodes in paths.Evaluator which will return evaluationIfMatch if
Path.endNode() for a given path is any of nodes,
else evaluationIfNoMatch.public static Evaluator returnWhereEndNodeIs(Node... nodes)
includeWhereEndNodeIs(Node...)public static PathEvaluator includeWhereEndNodeIs(Node... nodes)
Evaluation.INCLUDE_AND_CONTINUE for evaluationIfMatch and
Evaluation.EXCLUDE_AND_CONTINUE for evaluationIfNoMatch.nodes - end nodes for paths to be included in the result.public static PathEvaluator pruneWhereEndNodeIs(Node... nodes)
public static PathEvaluator includeIfContainsAll(Node... nodes)
Path if all the
nodes exist in it.nodes - Nodes that must exist in a Path for it
to be included.Evaluation.INCLUDE_AND_CONTINUE if all nodes
exist in a given Path, otherwise
Evaluation.EXCLUDE_AND_CONTINUE.public static PathEvaluator includeIfAcceptedByAny(PathEvaluator... evaluators)
Evaluators to a TraversalDescription puts those
evaluators in AND-mode this can group many evaluators in OR-mode.evaluators - represented as one evaluators. If any of the evaluators decides
to include a path it will be included.Evaluator which decides to include a path if any of the supplied
evaluators wants to include it.public static PathEvaluator includeIfAcceptedByAny(Evaluator... evaluators)
Evaluators to a TraversalDescription puts those
evaluators in AND-mode this can group many evaluators in OR-mode.evaluators - represented as one evaluators. If any of the evaluators decides
to include a path it will be included.Evaluator which decides to include a path if any of the supplied
evaluators wants to include it.Copyright © 2002–2015 The Neo4j Graph Database Project. All rights reserved.