tom | 43387f3 | 2014-08-27 14:42:43 -0700 | [diff] [blame] | 1 | package org.onlab.onos.net; |
| 2 | |
| 3 | import java.util.List; |
| 4 | |
| 5 | /** |
| 6 | * Representation of a contiguous directed path in a network. Path comprises |
| 7 | * of a sequence of links, where adjacent links must share the same device, |
| 8 | * meaning that destination of the source of one link must coincide with the |
| 9 | * destination of the previous link. |
| 10 | */ |
| 11 | public interface Path extends Link { |
| 12 | |
| 13 | /** |
| 14 | * Returns sequence of links comprising the path. |
| 15 | * |
| 16 | * @return list of links |
| 17 | */ |
| 18 | List<Link> links(); |
| 19 | |
tom | 9793755 | 2014-09-11 10:48:42 -0700 | [diff] [blame] | 20 | /** |
| 21 | * Returns the path cost as a unit-less value. |
| 22 | * |
| 23 | * @return unit-less path cost |
| 24 | */ |
| 25 | double cost(); |
| 26 | |
tom | 43387f3 | 2014-08-27 14:42:43 -0700 | [diff] [blame] | 27 | } |