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 interface |
Selector.PseudoClass |
static class |
Selector.PseudoClassType
A pseudo-class
|
static interface |
Selector.PseudoElement |
static class |
Selector.PseudoElementType
A pseudo-element
|
static interface |
Selector.PseudoPage |
static class |
Selector.PseudoPageType
A pseudo-class for @page rules
|
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.PseudoElementType |
getPseudoElementType()
Reads the pseudo-element of the selector
|
boolean |
hasPseudoClass(Selector.PseudoClassType pct)
Checks where the specified pseudo-class 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.PseudoElementType getPseudoElementType()
null if no pseudo-element is specifiedboolean hasPseudoClass(Selector.PseudoClassType pct)
pct - true if the selector has the specified pseudo-classvoid 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 © 2019. All rights reserved.