blob: 1d15fc74732c5e4fece22ef2c42839b8d26ba7ca [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/**
7 * Base class for Path representation
8 * @author Toshio Koide (t-koide@onlab.us)
9 */
Toshio Koided9fa2a82014-02-19 17:35:18 -080010public class Path extends LinkedList<LinkEvent> {
Toshio Koide5799b602014-02-10 15:29:06 -080011 private static final long serialVersionUID = 7127274096495173415L;
Toshio Koided9fa2a82014-02-19 17:35:18 -080012
Toshio Koide5799b602014-02-10 15:29:06 -080013 @Override
14 public String toString() {
15 StringBuilder builder = new StringBuilder();
Toshio Koided9fa2a82014-02-19 17:35:18 -080016 Iterator<LinkEvent> i = this.iterator();
Toshio Koide5799b602014-02-10 15:29:06 -080017 while (i.hasNext()) {
18 builder.append(i.next().toString());
19 if (i.hasNext())
20 builder.append(", ");
21 }
22 return builder.toString();
23 }
24}