blob: a00c425eba984cc378ca6558aea21a9ea08e3339 [file] [log] [blame]
Jonathan Hart472062d2014-04-03 10:56:48 -07001package net.onrc.onos.core.topology;
Toshio Koide5799b602014-02-10 15:29:06 -08002
3import java.util.Iterator;
4import java.util.LinkedList;
5
6/**
Ray Milkeyb41100a2014-04-10 10:42:15 -07007 * Base class for Path representation.
Ray Milkey269ffb92014-04-03 14:43:30 -07008 *
Toshio Koide5799b602014-02-10 15:29:06 -08009 * @author Toshio Koide (t-koide@onlab.us)
10 */
Toshio Koided9fa2a82014-02-19 17:35:18 -080011public class Path extends LinkedList<LinkEvent> {
Ray Milkey269ffb92014-04-03 14:43:30 -070012 private static final long serialVersionUID = 7127274096495173415L;
Toshio Koided9fa2a82014-02-19 17:35:18 -080013
Ray Milkey269ffb92014-04-03 14:43:30 -070014 @Override
15 public String toString() {
16 StringBuilder builder = new StringBuilder();
17 Iterator<LinkEvent> i = this.iterator();
18 while (i.hasNext()) {
19 builder.append(i.next().toString());
Ray Milkeyb29e6262014-04-09 16:02:14 -070020 if (i.hasNext()) {
Ray Milkey269ffb92014-04-03 14:43:30 -070021 builder.append(", ");
Ray Milkeyb29e6262014-04-09 16:02:14 -070022 }
Ray Milkey269ffb92014-04-03 14:43:30 -070023 }
24 return builder.toString();
25 }
Toshio Koide5799b602014-02-10 15:29:06 -080026}