Toshio Koide | 5f26065 | 2014-01-30 14:41:12 -0800 | [diff] [blame] | 1 | package net.onrc.onos.ofcontroller.app; |
| 2 | |
| 3 | import java.util.Iterator; |
| 4 | import java.util.LinkedList; |
| 5 | |
| 6 | /** |
| 7 | * Base class for Path representation |
| 8 | * This code is valid for the architectural study purpose only. |
| 9 | * @author Toshio Koide (t-koide@onlab.us) |
| 10 | */ |
| 11 | public class Path extends LinkedList<Link> { |
| 12 | private static final long serialVersionUID = 7127274096495173415L; |
| 13 | |
| 14 | @Override |
| 15 | public String toString() { |
| 16 | StringBuilder builder = new StringBuilder(); |
| 17 | Iterator<Link> i = this.iterator(); |
| 18 | while (i.hasNext()) { |
| 19 | builder.append(i.next().toString()); |
| 20 | if (i.hasNext()) |
| 21 | builder.append(", "); |
| 22 | } |
| 23 | return builder.toString(); |
| 24 | } |
| 25 | } |