tom | e348941 | 2014-08-29 02:30:38 -0700 | [diff] [blame^] | 1 | package org.onlab.graph; |
| 2 | |
| 3 | /** |
| 4 | * Abstraction of a mutable path that allows gradual construction. |
| 5 | */ |
| 6 | public interface MutablePath<V extends Vertex, E extends Edge<V>> extends Path<V, E> { |
| 7 | |
| 8 | /** |
| 9 | * Inserts a new edge at the beginning of this path. The edge must be |
| 10 | * adjacent to the prior start of the path. |
| 11 | * |
| 12 | * @param edge edge to be inserted |
| 13 | */ |
| 14 | void insertEdge(E edge); |
| 15 | |
| 16 | /** |
| 17 | * Appends a new edge at the end of the this path. The edge must be |
| 18 | * adjacent to the prior end of the path. |
| 19 | * |
| 20 | * @param edge edge to be inserted |
| 21 | */ |
| 22 | void appendEdge(E edge); |
| 23 | |
| 24 | /** |
| 25 | * Sets the total path cost as a unit-less double. |
| 26 | * |
| 27 | * @param cost new path cost |
| 28 | */ |
| 29 | void setCost(double cost); |
| 30 | |
| 31 | /** |
| 32 | * Returns an immutable copy of this path. |
| 33 | * |
| 34 | * @return immutable copy |
| 35 | */ |
| 36 | Path<V, E> toImmutable(); |
| 37 | |
| 38 | } |