java.lang.Object
io.sf.carte.doc.style.css.om.Specificity
- All Implemented Interfaces:
Serializable
The specificity of a selector (in the context given by a
SelectorMatcher
).
See Cascading Style Sheets, level 2 revision 1 CSS 2.1 Specification, § 6.4.3 and also Selectors Level 4 § 16, Calculating a selector’s specificity.
- See Also:
-
Constructor Summary
ConstructorDescriptionSpecificity
(Selector selector, SelectorMatcher matcher) Construct a specificity for a selector and aSelectorMatcher
context. -
Method Summary
Modifier and TypeMethodDescriptionboolean
int
hashCode()
static int
selectorCompare
(Specificity s1, Specificity s2) Compare two specificities according to its selectors.toString()
-
Constructor Details
-
Specificity
Construct a specificity for a selector and aSelectorMatcher
context.- Parameters:
selector
- the selector.matcher
- the selector matcher.
-
-
Method Details
-
hashCode
public int hashCode() -
equals
-
selectorCompare
Compare two specificities according to its selectors.- Parameters:
s1
- the first specificity being compared.s2
- the other specificity (to compare against the first).- Returns:
- a negative integer, zero, or a positive integer as the first argument is less than, equal to, or greater than the second.
-
toString
-