1 /* $Id: HWChannel.java 1 2010-02-24 13:03:05Z haidw $ */
2 package dol.datamodel.architecture;
4 import java.util.Iterator;
5 import java.util.Vector;
7 import dol.visitor.ArchiVisitor;
10 * This class represents an interconnect element in the architecture.
12 public class HWChannel extends ArchiResource {
14 * Constructor to create a HWChannel with a name and an empty
17 public HWChannel(String name) {
19 _pathList = new Vector<String>();
24 * @param x A Visitor Object.
26 public void accept(ArchiVisitor x) {
27 x.visitComponent(this);
31 * Clone this HWChannel
33 * @return a new instance of the HWChannel.
35 @SuppressWarnings("unchecked")
36 public Object clone() {
37 HWChannel newObj = (HWChannel) super.clone();
38 newObj.setPathList((Vector<String>)_pathList.clone());
43 * Get the range of this processor.
47 public String getRange() {
52 * Set the range of this process.
54 * @param range new range value
56 public void setRange(String range) {
61 * Get the type of this hw_channel.
65 public String getType() {
70 * Set the type of this hw_channel.
72 * @param type new range value
74 public void setType(String type) {
79 * Has this processor nodes?
81 * @return boolean value
83 public boolean hasNodes() {
84 Iterator<Node> i = getNodeList().iterator();
93 * Get the list of pathes via this resource.
95 * @return list of path.
97 public Vector<String> getPathList() {
102 * Set the list of pathes via this resource.
104 * @param list path list
106 public void setPathList(Vector<String> list) {
111 * Return a description of the processor.
113 * @return a description of the processor.
115 public String toString() {
116 return "HWChannel: " + getName() ;
120 * Range of the iterator when the instance belongs to an iterated
121 * series of processors.
123 protected String _range;
124 protected String _type;
126 // Store the name of pathes which go via this communication resource.
127 protected Vector<String> _pathList;