Package com.amalgamasimulation.graph
Interface Algorithm.GraphTraversalPredicate<A,B>
- Enclosing interface:
Algorithm
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Functional interface for a predicate answering the question "Can we traverse
the arc and the node adjacent to this arc?"
Example of implementation:
(addedArc, addedNode, addedArcDirection) -> true
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionbooleancanAddArcAndNode(Graph<A, B>.Arc addedArc, Graph<A, B>.Node addedNode, Algorithm.ArcRelativeDirection addedArcDirection) Predicate answering the question "Can we traverse the arc and the node adjacent to this arc?"
-
Method Details
-
canAddArcAndNode
boolean canAddArcAndNode(Graph<A, B>.Arc addedArc, Graph<A, B>.Node addedNode, Algorithm.ArcRelativeDirection addedArcDirection) Predicate answering the question "Can we traverse the arc and the node adjacent to this arc?"- Parameters:
addedArc- arc being testedaddedNode- a new node that would be connected by the added arc being testedaddedArcDirection- direction of the arc begin tested,Algorithm.ArcRelativeDirection.OUTGOINGorAlgorithm.ArcRelativeDirection.INCOMING- Returns:
trueif we should traverse the added arc,falseotherwise- See Also:
-