1 18 package org.apache.batik.svggen; 19 20 import java.util.HashSet ; 21 import java.util.Set ; 22 23 31 public class SVGAttribute { 32 35 private String name; 36 37 41 private Set applicabilitySet; 42 43 50 private boolean isSetInclusive; 51 52 59 public SVGAttribute(Set applicabilitySet, boolean isSetInclusive){ 60 if(applicabilitySet == null) 61 applicabilitySet = new HashSet (); 62 63 this.applicabilitySet = applicabilitySet; 64 this.isSetInclusive = isSetInclusive; 65 } 66 67 72 public boolean appliesTo(String tag){ 73 boolean tagInMap = applicabilitySet.contains(tag); 74 if(isSetInclusive) 75 return tagInMap; 76 else 77 return !tagInMap; 78 } 79 } 80 | Popular Tags |