1 18 package org.apache.batik.css.engine.sac; 19 20 import java.util.Set ; 21 22 import org.w3c.css.sac.Condition; 23 import org.w3c.dom.Element ; 24 25 32 public class CSSAndCondition extends AbstractCombinatorCondition { 33 36 public CSSAndCondition(Condition c1, Condition c2) { 37 super(c1, c2); 38 } 39 40 44 public short getConditionType() { 45 return SAC_AND_CONDITION; 46 } 47 48 51 public boolean match(Element e, String pseudoE) { 52 return ((ExtendedCondition)getFirstCondition()).match(e, pseudoE) && 53 ((ExtendedCondition)getSecondCondition()).match(e, pseudoE); 54 } 55 56 59 public void fillAttributeSet(Set attrSet) { 60 ((ExtendedCondition)getFirstCondition()).fillAttributeSet(attrSet); 61 ((ExtendedCondition)getSecondCondition()).fillAttributeSet(attrSet); 62 } 63 64 67 public String toString() { 68 return "" + getFirstCondition() + getSecondCondition(); 69 } 70 } 71 | Popular Tags |