diff options
Diffstat (limited to 'core/sliPluginUtils/provider/src/main/java/org/onap/ccsdk/sli/core/slipluginutils/slitopologyutils/graph/Path.java')
-rw-r--r-- | core/sliPluginUtils/provider/src/main/java/org/onap/ccsdk/sli/core/slipluginutils/slitopologyutils/graph/Path.java | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/core/sliPluginUtils/provider/src/main/java/org/onap/ccsdk/sli/core/slipluginutils/slitopologyutils/graph/Path.java b/core/sliPluginUtils/provider/src/main/java/org/onap/ccsdk/sli/core/slipluginutils/slitopologyutils/graph/Path.java new file mode 100644 index 000000000..c8a2ef985 --- /dev/null +++ b/core/sliPluginUtils/provider/src/main/java/org/onap/ccsdk/sli/core/slipluginutils/slitopologyutils/graph/Path.java @@ -0,0 +1,30 @@ +package org.onap.ccsdk.sli.core.slipluginutils.slitopologyutils.graph; + +import java.util.List; + +/** + * Representation of a path in a graph as a sequence of edges. Paths are + * assumed to be continuous, where adjacent edges must share a vertex. + * + * @param <V> vertex type + * @param <E> edge type + */ +public interface Path<V extends Vertex, E extends Edge<V>> extends Edge<V> { + + /** + * Returns the list of edges comprising the path. Adjacent edges will + * share the same vertex, meaning that a source of one edge, will be the + * same as the destination of the prior edge. + * + * @return list of path edges + */ + List<E> edges(); + + /** + * Returns the total cost of the path as a weight object. + * + * @return path cost as a weight object + */ + Weight cost(); + +} |