public class SelectorImpl extends AbstractRule<Selector.SelectorPart> implements Selector
| Modifier and Type | Class and Description |
|---|---|
static class |
SelectorImpl.ElementAttributeImpl
Attribute holder
|
static class |
SelectorImpl.ElementClassImpl
Element class
|
static class |
SelectorImpl.ElementDOMImpl |
static class |
SelectorImpl.ElementIDImpl
Element ID
|
static class |
SelectorImpl.ElementNameImpl
Element name
|
static class |
SelectorImpl.PseudoPageImpl
Wrap of CSS pseudo class or pseudo class with function
|
Selector.Combinator, Selector.ElementAttribute, Selector.ElementClass, Selector.ElementDOM, Selector.ElementID, Selector.ElementName, Selector.Operator, Selector.PseudoDeclaration, Selector.PseudoPage, Selector.SelectorPart| Modifier and Type | Field and Description |
|---|---|
protected Selector.Combinator |
combinator |
hash, listmodCount| Constructor and Description |
|---|
SelectorImpl() |
| Modifier and Type | Method and Description |
|---|---|
void |
computeSpecificity(CombinedSelector.Specificity spec)
Computes specificity of this selector
|
boolean |
equals(Object obj) |
String |
getClassName()
Name of CSS class which is affected by this selector
|
Selector.Combinator |
getCombinator()
Returns combinator of this and other simple selector
|
String |
getElementName()
Name of HTML element which is affected by this selector
|
String |
getIDName()
ID of CSS item which is affected by this selector
|
Selector.PseudoDeclaration |
getPseudoElement()
Reads the pseudoelement of the selector
|
int |
hashCode() |
boolean |
matches(Element e)
Matches simple selector against DOM element
|
boolean |
matches(Element e,
MatchCondition cond)
Matches simple selector against DOM element with an additional condition
|
Selector |
setCombinator(Selector.Combinator combinator)
Sets combinator
|
String |
toString() |
add, add, asList, get, iterator, remove, replaceAll, set, size, unlockaddAll, clear, indexOf, lastIndexOf, listIterator, listIterator, removeRange, subListaddAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArrayclone, finalize, getClass, notify, notifyAll, wait, wait, waitasList, replaceAll, unlockprotected Selector.Combinator combinator
public Selector.Combinator getCombinator()
SelectorgetCombinator in interface Selectorpublic Selector setCombinator(Selector.Combinator combinator)
SelectorsetCombinator in interface Selectorcombinator - the combinator to setpublic String toString()
toString in class AbstractCollection<Selector.SelectorPart>public String getClassName()
SelectorgetClassName in interface Selectorpublic String getIDName()
Selectorpublic String getElementName()
SelectorgetElementName in interface Selectorpublic Selector.PseudoDeclaration getPseudoElement()
SelectorgetPseudoElement in interface Selectornull if no pseudo-element is specifiedpublic boolean matches(Element e)
Selectorpublic boolean matches(Element e, MatchCondition cond)
Selectorpublic void computeSpecificity(CombinedSelector.Specificity spec)
computeSpecificity in interface Selectorspec - Specificity to be modifiedpublic int hashCode()
hashCode in interface Collection<Selector.SelectorPart>hashCode in interface List<Selector.SelectorPart>hashCode in class AbstractRule<Selector.SelectorPart>public boolean equals(Object obj)
equals in interface Collection<Selector.SelectorPart>equals in interface List<Selector.SelectorPart>equals in class AbstractRule<Selector.SelectorPart>Copyright © 2014. All rights reserved.