Class CssTagSelectorItem
java.lang.Object
com.itextpdf.styledxmlparser.css.selector.item.CssTagSelectorItem
- All Implemented Interfaces:
ICssSelectorItem
ICssSelectorItem
implementation for tag selectors.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate boolean
Indicates if the selector is universally valid.private String
The tag name. -
Constructor Summary
ConstructorsConstructorDescriptionCssTagSelectorItem
(String tagName) Creates a newCssTagSelectorItem
instance. -
Method Summary
Modifier and TypeMethodDescriptionint
Gets the specificity.boolean
Checks if the selector matches an element.toString()
-
Field Details
-
tagName
The tag name. -
isUniversal
private boolean isUniversalIndicates if the selector is universally valid.
-
-
Constructor Details
-
CssTagSelectorItem
Creates a newCssTagSelectorItem
instance.- Parameters:
tagName
- the tag name
-
-
Method Details
-
getSpecificity
public int getSpecificity()Description copied from interface:ICssSelectorItem
Gets the specificity.- Specified by:
getSpecificity
in interfaceICssSelectorItem
- Returns:
- the specificity
-
matches
Description copied from interface:ICssSelectorItem
Checks if the selector matches an element.- Specified by:
matches
in interfaceICssSelectorItem
- Parameters:
node
- the element- Returns:
- true, if there's a match
-
toString
-