Module org.tentackle.common
Package org.tentackle.common
Interface PathFactory<P extends Path<P,E>,E>
- Type Parameters:
P- the path typeE- the path element type
public interface PathFactory<P extends Path<P,E>,E>
A factory for
Paths.- Author:
- harald
-
Method Summary
Modifier and TypeMethodDescriptionCreates a new path from elements and continuation paths.Creates a new path by prepending elements to an existing path.Merge paths to remove redundant path segments.
The returned consolidated paths form a hierarchical graph.
-
Method Details
-
create
Creates a new path from elements and continuation paths.- Parameters:
elements- the elements of the pathpaths- the continuation paths- Returns:
- the new path
-
create
Creates a new path by prepending elements to an existing path.- Parameters:
elements- the elements to prependpath- the path to prepend elements- Returns:
- the new concatenated path
-
merge
Merge paths to remove redundant path segments.
The returned consolidated paths form a hierarchical graph.Example: given: a1 -- b1 -- c1 -- d1 -- eX a1 -- b1 -- c1 -- d2 a1 -- b1 -- c2 a1 -- b1 -- c2 -- d3 a1 -- b1 -- c2 -- d3 -- eX a1 -- b2 -- cX -- dX a1 -- b2 merged result: a1 -- b1 -- c1 -- d1 -- eX | | | | | -- d2 | | | -- c2 -- d3 -- eX | -- b2 -- cX -- dX- Parameters:
paths- input paths- Returns:
- consolidated paths
-