1 15 package org.apache.hivemind.parse; 16 17 import java.util.HashSet ; 18 import java.util.Iterator ; 19 import java.util.Set ; 20 21 27 public class ElementParseInfo 28 { 29 private Set _knownAttributes = new HashSet (); 30 private Set _requiredAttributes = new HashSet (); 31 32 public void addAttribute(String name, boolean required) 33 { 34 _knownAttributes.add(name); 35 36 if (required) 37 _requiredAttributes.add(name); 38 } 39 40 public boolean isKnown(String attributeName) 41 { 42 return _knownAttributes.contains(attributeName); 43 } 44 45 49 public Iterator getRequiredNames() 50 { 51 return _requiredAttributes.iterator(); 52 } 53 } 54 | Popular Tags |