Class CSSConditionalSelectorImpl

java.lang.Object
org.eclipse.e4.ui.css.core.impl.sac.CSSConditionalSelectorImpl
All Implemented Interfaces:
ExtendedSelector, org.w3c.css.sac.ConditionalSelector, org.w3c.css.sac.Selector, org.w3c.css.sac.SimpleSelector

public class CSSConditionalSelectorImpl extends Object implements org.w3c.css.sac.ConditionalSelector, ExtendedSelector
This class provides an implementation of the ConditionalSelector interface.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected org.w3c.css.sac.Condition
    The condition.
    protected org.w3c.css.sac.SimpleSelector
    The simple selector.

    Fields inherited from interface org.w3c.css.sac.Selector

    SAC_ANY_NODE_SELECTOR, SAC_CDATA_SECTION_NODE_SELECTOR, SAC_CHILD_SELECTOR, SAC_COMMENT_NODE_SELECTOR, SAC_CONDITIONAL_SELECTOR, SAC_DESCENDANT_SELECTOR, SAC_DIRECT_ADJACENT_SELECTOR, SAC_ELEMENT_NODE_SELECTOR, SAC_NEGATIVE_SELECTOR, SAC_PROCESSING_INSTRUCTION_NODE_SELECTOR, SAC_PSEUDO_ELEMENT_SELECTOR, SAC_ROOT_NODE_SELECTOR, SAC_TEXT_NODE_SELECTOR
  • Constructor Summary

    Constructors
    Constructor
    Description
    CSSConditionalSelectorImpl(org.w3c.css.sac.SimpleSelector s, org.w3c.css.sac.Condition c)
    Creates a new ConditionalSelector object.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Indicates whether some other object is "equal to" this one.
    void
    Fills the given set with the attribute names found in this selector.
    org.w3c.css.sac.Condition
    SAC: Implements ConditionalSelector.getCondition().
    short
    SAC: Implements Selector.getSelectorType().
    org.w3c.css.sac.SimpleSelector
    SAC: Implements ConditionalSelector.getSimpleSelector().
    int
    Returns the specificity of this selector.
    boolean
    match(Element e, String pseudoE)
    Tests whether this selector matches the given element.
    boolean
    match(Element e, Node[] hierarchy, int parentIndex, String pseudoE)
     
    Returns a representation of the selector.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Field Details

    • simpleSelector

      protected org.w3c.css.sac.SimpleSelector simpleSelector
      The simple selector.
    • condition

      protected org.w3c.css.sac.Condition condition
      The condition.
  • Constructor Details

    • CSSConditionalSelectorImpl

      public CSSConditionalSelectorImpl(org.w3c.css.sac.SimpleSelector s, org.w3c.css.sac.Condition c)
      Creates a new ConditionalSelector object.
  • Method Details

    • 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.
    • getSelectorType

      public short getSelectorType()
      SAC: Implements Selector.getSelectorType().
      Specified by:
      getSelectorType in interface org.w3c.css.sac.Selector
    • match

      public boolean match(Element e, Node[] hierarchy, int parentIndex, String pseudoE)
      Specified by:
      match in interface ExtendedSelector
    • match

      public boolean match(Element e, String pseudoE)
      Tests whether this selector matches the given element.
      Specified by:
      match in interface ExtendedSelector
    • fillAttributeSet

      public void fillAttributeSet(Set<String> attrSet)
      Fills the given set with the attribute names found in this selector.
      Specified by:
      fillAttributeSet in interface ExtendedSelector
    • getSpecificity

      public int getSpecificity()
      Returns the specificity of this selector.
      Specified by:
      getSpecificity in interface ExtendedSelector
    • getSimpleSelector

      public org.w3c.css.sac.SimpleSelector getSimpleSelector()
      SAC: Implements ConditionalSelector.getSimpleSelector().
      Specified by:
      getSimpleSelector in interface org.w3c.css.sac.ConditionalSelector
    • getCondition

      public org.w3c.css.sac.Condition getCondition()
      SAC: Implements ConditionalSelector.getCondition().
      Specified by:
      getCondition in interface org.w3c.css.sac.ConditionalSelector
    • toString

      public String toString()
      Returns a representation of the selector.
      Overrides:
      toString in class Object