package nloc; import java.util.List; public class SequenceTuple { private Droplet droplet; private int minPos, maxPos; private List<Channel> path; public SequenceTuple(Droplet droplet, List<Channel> path) { this.minPos = 0; this.maxPos = 0; this.droplet = droplet; this.path = path; } public SequenceTuple(Droplet droplet, List<Channel> path, int minPos, int maxPos) { this.minPos = minPos; this.maxPos = maxPos; this.droplet = droplet; this.path = path; } public int getMinPos() { return minPos; } public int getMaxPos() { return maxPos; } public Droplet getDroplet() { return droplet; } public List<Channel> getPath() { return path; } public void setMinPos(int minPos) { this.minPos = minPos; } public void setMaxPos(int maxPos) { this.maxPos = maxPos; } public void setDroplet(Droplet droplet) { this.droplet = droplet; } public void setPath(List<Channel> path) { this.path = path; } public Channel getPumpOutlet() { Channel outlet = null; for (Channel ch: path) { if (ch.getParents().size() == 1 && ch.getParents().get(0) instanceof Pump) { outlet = ch; } } return outlet; } }