public class AttributeSetSelector extends java.lang.Object implements Selector
Equivalent to [attribute]
selector in CSS. Its specificity is (0,0,1,0).
Element.getAttribute(String)
,
SpecificityHelper
Constructor and Description |
---|
AttributeSetSelector(java.lang.String attribute)
Creates an attribute set selector.
|
Modifier and Type | Method and Description |
---|---|
boolean |
fit(Element element)
Checks whether or not the given element fits this selector.
|
int |
getSpecificity()
Gets the selector specificity.
|
public AttributeSetSelector(java.lang.String attribute)
attribute
- the attribute to check.public boolean fit(Element element)
Selector
public int getSpecificity()
Selector
See CSS for more information about calculating a selector's specificity.
getSpecificity
in interface Selector