public interface Selector extends Rule<Selector.SelectorPart>
| Modifier and Type | Interface and Description |
|---|---|
static class |
Selector.Combinator
Combinator for simple selectors
|
static interface |
Selector.ElementAttribute
Element attribute
|
static interface |
Selector.ElementClass
Element class
|
static interface |
Selector.ElementDOM |
static interface |
Selector.ElementID
Element id
|
static interface |
Selector.ElementName
Element name
|
static class |
Selector.Operator
Operator for SelectorPart attributes
|
static class |
Selector.PseudoDeclaration
A pseudo class or element specification
|
static interface |
Selector.PseudoPage
Pseudo page
|
static interface |
Selector.SelectorPart
Interface for handling items
|
| Modifier and Type | Method and Description |
|---|---|
void |
computeSpecificity(CombinedSelector.Specificity spec)
Modifies specificity according to CSS standard
|
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
|
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
|
Selector |
setCombinator(Selector.Combinator combinator)
Sets combinator
|
asList, replaceAll, unlockadd, add, addAll, addAll, clear, contains, containsAll, equals, get, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArrayparallelStream, removeIf, streamSelector.Combinator getCombinator()
Selector setCombinator(Selector.Combinator combinator)
combinator - Combinator between this and other selectorString getClassName()
String getIDName()
String getElementName()
Selector.PseudoDeclaration getPseudoElement()
null if no pseudo-element is specifiedboolean hasPseudoDeclaration(Selector.PseudoDeclaration pd)
true if the selector has the specified pseudo declarationvoid computeSpecificity(CombinedSelector.Specificity spec)
spec - Specificity to be modifiedboolean matches(Element e)
e - Elementtrue in case of matchboolean matches(Element e, ElementMatcher matcher, MatchCondition cond)
e - Elementmatcher - Element matcher to be usedcond - An additional condition to be appliedtrue in case of matchCopyright © 2018. All rights reserved.