java.lang.Object
javafx.css.Match
- All Implemented Interfaces:
Comparable<Match>
Used by
Rule
to determine whether or not the selector applies to a
given object.
Returned by Selector
matches in the event of a match.- Since:
- 9
-
Method Summary
Modifier and TypeMethodDescriptionint
Compares this object with the givenMatch
object.Gets the pseudo class states as an immutable set.Gets theSelector
.int
Gets the specificity.
-
Method Details
-
getSelector
Gets theSelector
.- Returns:
- the
Selector
, nevernull
-
getPseudoClasses
Gets the pseudo class states as an immutable set.- Returns:
- the pseudo class state, never
null
-
getSpecificity
public int getSpecificity()Gets the specificity.- Returns:
- the specificity
-
compareTo
Compares this object with the givenMatch
object.Comparison is based on the specificity of the objects. Specificity is calculated based on the id count, the style class count and the pseudoclass count.
- Specified by:
compareTo
in interfaceComparable<Match>
- Parameters:
o
- theMatch
object to be compared- Returns:
- the difference between the specificity of this object and
the specificity of the given
Match
object
-