1 package Analysis.TaskStateAnalysis;
2 import Analysis.TaskStateAnalysis.*;
9 public class EGTaskNode extends TaskNode {
10 private boolean source=false;
11 private int loopmarker=0;
12 private boolean multipleparams=false;
13 private boolean optional = false;
14 private boolean marked=false;
15 private boolean tomention=true;
18 private TaskDescriptor td;
19 protected HashSet edges = new HashSet();
26 public EGTaskNode(String name){
32 public EGTaskNode(String name, FlagState fs){
38 public EGTaskNode(String name, TaskDescriptor td){
44 public EGTaskNode(String name, FlagState fs, TaskDescriptor td){
50 public int hashCode(){
51 return getLabel().hashCode();
54 public boolean equals(Object o){
55 if(o instanceof EGTaskNode){
56 EGTaskNode tn=(EGTaskNode) o;
57 return (tn.getLabel().compareTo(this.getLabel())==0) ? true : false;
62 public HashSet getEdgeSet(){
66 public void addEdge(EGEdge newedge) {
67 newedge.setSource(this);
69 EGTaskNode tonode=newedge.getTarget();
70 tonode.inedges.addElement(newedge);
73 public Iterator edges(){
74 return edges.iterator();
77 public TaskDescriptor getTD(){
81 public void setSource(){
85 public boolean isSource(){
93 public void doSelfLoopMarking(){
97 public void doLoopMarking(){
101 public boolean isSelfLoop(){
102 if (loopmarker==1) return true;
106 public boolean isLoop(){
107 if (loopmarker==2) return true;
111 public void setMultipleParams(){
115 public boolean isMultipleParams(){
116 return multipleparams;
119 public void setOptional(){
123 public boolean isOptional(){
131 public void unMark(){
135 public boolean isMarked(){
139 public String getFSName(){
140 if(fs == null) return "no flag";
141 else return fs.getTextLabel();
144 public FlagState getFS(){
148 public void dontMention(){
152 public boolean toMention(){
156 public void setAND(){