Module org.htmlunit.cssparser
Package org.htmlunit.cssparser.dom
Class CSSStyleSheetImpl.CSSStyleSheetRuleIndex
java.lang.Object
org.htmlunit.cssparser.dom.CSSStyleSheetImpl.CSSStyleSheetRuleIndex
- Enclosing class:
- CSSStyleSheetImpl
Rule index helper for stylesheet selector lookups.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddClassSelector(ElementSelector elementSelector, String className, Selector s, CSSStyleRuleImpl styleRule) Adds a ClassSelector.voidaddElementSelector(ElementSelector elementSelector, Selector s, CSSStyleRuleImpl styleRule) Adds an ElementSelector.addMedia(MediaListImpl mediaList) Adds a media list.voidaddOtherSelector(Selector s, CSSStyleRuleImpl styleRule) Adds an OtherSelector.Returns the children.Returns the media list.getSelectorEntriesIteratorFor(String elementName, String[] classes) Returns an iterator over selector entries for the specified element and classes.
-
Constructor Details
-
CSSStyleSheetRuleIndex
public CSSStyleSheetRuleIndex()
-
-
Method Details
-
addElementSelector
public void addElementSelector(ElementSelector elementSelector, Selector s, CSSStyleRuleImpl styleRule) Adds an ElementSelector.- Parameters:
elementSelector- the selector to be addeds- the selectorstyleRule- the rule
-
addClassSelector
public void addClassSelector(ElementSelector elementSelector, String className, Selector s, CSSStyleRuleImpl styleRule) Adds a ClassSelector.- Parameters:
elementSelector- the selector to be addedclassName- the class names- the selectorstyleRule- the rule
-
addOtherSelector
Adds an OtherSelector.- Parameters:
s- the selectorstyleRule- the rule
-
addMedia
Adds a media list.- Parameters:
mediaList- the list to add- Returns:
- the CSSStyleSheetRuleIndex
-
getMediaList
Returns the media list.- Returns:
- the media list
-
getChildren
Returns the children.- Returns:
- the children
-
getSelectorEntriesIteratorFor
public Iterator<CSSStyleSheetImpl.SelectorEntry> getSelectorEntriesIteratorFor(String elementName, String[] classes) Returns an iterator over selector entries for the specified element and classes.- Parameters:
elementName- the elementclasses- the classes- Returns:
- Iterator of SelectorEntry
-