public class StyleElement extends Object implements Serializable
Modifier and Type | Field and Description |
---|---|
static String |
PRIORITY_IMPORTANT
CSS important property constant.
|
Constructor and Description |
---|
StyleElement(String name,
String value,
String priority,
org.htmlunit.cssparser.parser.selector.SelectorSpecificity specificity)
Creates a new instance.
|
StyleElement(String name,
String value,
String priority,
org.htmlunit.cssparser.parser.selector.SelectorSpecificity specificity,
long index)
Creates a new instance.
|
Modifier and Type | Method and Description |
---|---|
static int |
compareToByImportanceAndSpecificity(StyleElement first,
StyleElement second)
This takes only the importance, the specificity and the index into account.
|
long |
getIndex()
Returns the style element's index.
|
String |
getName()
Returns the style element's name.
|
String |
getPriority()
Returns the style element's priority.
|
org.htmlunit.cssparser.parser.selector.SelectorSpecificity |
getSpecificity()
Returns the specificity of the rule specifying this element.
|
String |
getValue()
Returns the style element's value.
|
boolean |
isImportant() |
String |
toString() |
public static final String PRIORITY_IMPORTANT
public StyleElement(String name, String value, String priority, org.htmlunit.cssparser.parser.selector.SelectorSpecificity specificity, long index)
name
- the style element's namevalue
- the style element's valuepriority
- the style element's priority like "important"specificity
- the specificity of the rule providing this style informationindex
- the style element's indexpublic StyleElement(String name, String value, String priority, org.htmlunit.cssparser.parser.selector.SelectorSpecificity specificity)
name
- the style element's namevalue
- the style element's valuepriority
- the style element's priority like "important"specificity
- the specificity of the rule providing this style informationpublic String getName()
public String getValue()
public String getPriority()
public boolean isImportant()
public org.htmlunit.cssparser.parser.selector.SelectorSpecificity getSpecificity()
public long getIndex()
public static int compareToByImportanceAndSpecificity(StyleElement first, StyleElement second)
first
- the StyleElement
to comparesecond
- the StyleElement
to compare withCopyright © 2002–2025 Gargoyle Software Inc.. All rights reserved.