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 |
protected Selector.PseudoDeclaration |
pseudoElement |
hash, listmodCount| Constructor and Description |
|---|
SelectorImpl() |
| Modifier and Type | Method and Description |
|---|---|
void |
add(int index,
Selector.SelectorPart element) |
boolean |
add(Selector.SelectorPart o) |
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 |
hasPseudoDeclaration(Selector.PseudoDeclaration pd)
Checks where the specified pseudo declaration is in this selector
|
boolean |
matches(Element e)
Matches simple selector against DOM element using the default element matcher
and the default match condition registered in CSSFactory.
|
boolean |
matches(Element e,
ElementMatcher matcher,
MatchCondition cond)
Matches simple selector against DOM element with an additional condition
|
Rule<Selector.SelectorPart> |
replaceAll(List<Selector.SelectorPart> replacement)
Replaces all elements stored inside.
|
Selector.SelectorPart |
set(int index,
Selector.SelectorPart element) |
Selector |
setCombinator(Selector.Combinator combinator)
Sets combinator
|
String |
toString() |
asList, get, iterator, remove, size, unlockaddAll, clear, indexOf, lastIndexOf, listIterator, listIterator, removeRange, subListaddAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArrayclone, finalize, getClass, notify, notifyAll, wait, wait, waitaddAll, addAll, clear, contains, containsAll, get, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, replaceAll, retainAll, size, sort, spliterator, subList, toArray, toArrayparallelStream, removeIf, streamprotected Selector.Combinator combinator
protected Selector.PseudoDeclaration pseudoElement
public Rule<Selector.SelectorPart> replaceAll(List<Selector.SelectorPart> replacement)
RulereplaceAll in interface Rule<Selector.SelectorPart>replaceAll in class AbstractRule<Selector.SelectorPart>replacement - New listpublic Selector.SelectorPart set(int index, Selector.SelectorPart element)
set in interface List<Selector.SelectorPart>set in class AbstractRule<Selector.SelectorPart>public void add(int index,
Selector.SelectorPart element)
add in interface List<Selector.SelectorPart>add in class AbstractRule<Selector.SelectorPart>public boolean add(Selector.SelectorPart o)
add in interface Collection<Selector.SelectorPart>add in interface List<Selector.SelectorPart>add in class AbstractRule<Selector.SelectorPart>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 hasPseudoDeclaration(Selector.PseudoDeclaration pd)
SelectorhasPseudoDeclaration in interface Selectortrue if the selector has the specified pseudo declarationpublic boolean matches(Element e)
Selectorpublic boolean matches(Element e, ElementMatcher matcher, 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 © 2018. All rights reserved.