Newer
Older
AlgebraicDataflowArchitectureModel / AlgebraicDataflowArchitectureModel / src / models / dataFlowModel / ChannelNode.java
package models.dataFlowModel;

import java.util.HashSet;
import java.util.Set;

import models.Node;

public class ChannelNode extends Node {
	protected ChannelNode parent = null;
	protected Set<ChannelNode> children = null;
	protected DataTransferChannel channel = null;
	
	public ChannelNode(ChannelNode parent, DataTransferChannel channel) {
		this.parent = parent;
		this.channel = channel;
		this.children = new HashSet<>();
	}
	
	public ChannelNode getParent() {
		return parent;
	}

	public Set<ChannelNode> getChildren() {
		return children;
	}

	public void addChild(ChannelNode child) {
		children.add(child);
		child.parent = this;
	}

	public DataTransferChannel getChannel() {
		return channel;
	}

	public void setChannel(DataTransferChannel channel) {
		this.channel = channel;
	}
}