org.apache.batik.css.engine.sac
Class CSSLangCondition

java.lang.Object
  extended by org.apache.batik.css.engine.sac.CSSLangCondition
All Implemented Interfaces:
ExtendedCondition, org.w3c.css.sac.Condition, org.w3c.css.sac.LangCondition

public class CSSLangCondition
extends Object
implements org.w3c.css.sac.LangCondition, ExtendedCondition

This class provides an implementation of the LangCondition interface.


Field Summary
protected  String lang
          The language.
protected  String langHyphen
          The language with a hyphen suffixed.
 
Fields inherited from interface org.w3c.css.sac.Condition
SAC_AND_CONDITION, SAC_ATTRIBUTE_CONDITION, SAC_BEGIN_HYPHEN_ATTRIBUTE_CONDITION, SAC_CLASS_CONDITION, SAC_CONTENT_CONDITION, SAC_ID_CONDITION, SAC_LANG_CONDITION, SAC_NEGATIVE_CONDITION, SAC_ONE_OF_ATTRIBUTE_CONDITION, SAC_ONLY_CHILD_CONDITION, SAC_ONLY_TYPE_CONDITION, SAC_OR_CONDITION, SAC_POSITIONAL_CONDITION, SAC_PSEUDO_CLASS_CONDITION
 
Constructor Summary
CSSLangCondition(String lang)
          Creates a new LangCondition object.
 
Method Summary
 boolean equals(Object obj)
          Indicates whether some other object is "equal to" this one.
 void fillAttributeSet(Set attrSet)
          Fills the given set with the attribute names found in this selector.
 short getConditionType()
          SAC: Implements Condition.getConditionType().
 String getLang()
          SAC: Implements LangCondition.getLang().
 int getSpecificity()
          Returns the specificity of this condition.
 boolean match(Element e, String pseudoE)
          Tests whether this condition matches the given element.
 String toString()
          Returns a text representation of this object.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

lang

protected String lang
The language.


langHyphen

protected String langHyphen
The language with a hyphen suffixed.

Constructor Detail

CSSLangCondition

public CSSLangCondition(String lang)
Creates a new LangCondition object.

Method Detail

equals

public boolean equals(Object obj)
Indicates whether some other object is "equal to" this one.

Overrides:
equals in class Object
Parameters:
obj - the reference object with which to compare.

getConditionType

public short getConditionType()
SAC: Implements Condition.getConditionType().

Specified by:
getConditionType in interface org.w3c.css.sac.Condition

getLang

public String getLang()
SAC: Implements LangCondition.getLang().

Specified by:
getLang in interface org.w3c.css.sac.LangCondition

getSpecificity

public int getSpecificity()
Returns the specificity of this condition.

Specified by:
getSpecificity in interface ExtendedCondition

match

public boolean match(Element e,
                     String pseudoE)
Tests whether this condition matches the given element.

Specified by:
match in interface ExtendedCondition

fillAttributeSet

public void fillAttributeSet(Set attrSet)
Fills the given set with the attribute names found in this selector.

Specified by:
fillAttributeSet in interface ExtendedCondition

toString

public String toString()
Returns a text representation of this object.

Overrides:
toString in class Object


Copyright © 2008 Apache Software Foundation. All Rights Reserved.