checking in beginnings of tag state analysis
[IRC.git] / Robust / src / Analysis / TaskStateAnalysis / FlagState.java
index 9a781812fe7b0e17a70d3fef4c5e4093b76a940e..255057c2621b955ee3c1959239722fb237d6fd8e 100644 (file)
@@ -126,13 +126,14 @@ public class FlagState extends GraphNode {
        }
     }
 
+    public int getTagCount(TagDescriptor tag) {
+       if (tags.containsKey(tag))
+           return tags.get(tag).intValue();
+       else return 0;
+    }
+
     public int getTagCount(String tagtype){
-       for (Enumeration en=getTags();en.hasMoreElements();){
-           TagDescriptor td=(TagDescriptor)en.nextElement();
-           if (tagtype.equals(td.getSymbol()))
-               return tags.get(td).intValue();   //returns either ONETAG or MULTITAG
-       }
-       return NOTAGS;
+       return getTagCount(new TagDescriptor(tagtype));
     }
     
     public FlagState[] clearTag(TagDescriptor tag){
@@ -230,9 +231,6 @@ public class FlagState extends GraphNode {
        return "N"+uid;
     }
     
-    
-       
-
     public String getTextLabel() {
        String label=null;
        for(Iterator it=getFlags();it.hasNext();) {