Class Selector
java.lang.Object
dev.prozilla.pine.common.property.style.selector.Selector
- All Implemented Interfaces:
Printable
- Direct Known Subclasses:
ClassSelector
,IdSelector
,ModifierSelector
,NotSelector
,SelectorCombo
,TypeSelector
A selector for nodes based on CSS selectors.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract boolean
boolean
abstract int
Returns an integer representing the specificity of this selector.abstract boolean
Checks whether this selector matches a given node.static Selector
-
Field Details
-
UNIVERSAL
Matches all elements.
-
-
Constructor Details
-
Selector
public Selector()
-
-
Method Details
-
matches
Checks whether this selector matches a given node.- Parameters:
node
- The node- Returns:
- True if this selector matches the node.
-
getSpecificity
public abstract int getSpecificity()Returns an integer representing the specificity of this selector.- Returns:
- The specificity of this selector
-
equals
-
equals
-
parse
-