Class Selector
java.lang.Object
dev.prozilla.pine.common.property.style.selector.Selector
- All Implemented Interfaces:
Printable
- Direct Known Subclasses:
ChildSelector,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 booleanbooleanabstract intReturns an integer representing the specificity of this selector.abstract booleanChecks whether this selector matches a given node.static SelectorDeprecated.abstract @NotNull StringtoString()Returns a string representation of this object.
-
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
-
toString
Description copied from interface:PrintableReturns a string representation of this object. -
parse
Deprecated.Replaced bySelectorParseras of 2.0.2
-
SelectorParseras of 2.0.2