- java.lang.Object
-
- javafx.css.Match
-
- All Implemented Interfaces:
Comparable<Match>
public final class Match extends Object implements Comparable<Match>
Used byRuleto determine whether or not the selector applies to a given object. Returned bySelectormatches in the event of a match.- Since:
- 9
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompareTo(Match o)Compares this object with the givenMatchobject.com.sun.javafx.css.PseudoClassStategetPseudoClasses()Gets the pseudo class state.SelectorgetSelector()Gets theSelector.intgetSpecificity()Gets the specificity.
-
-
-
Method Detail
-
getSelector
public Selector getSelector()
Gets theSelector.- Returns:
- the
Selector
-
getPseudoClasses
public com.sun.javafx.css.PseudoClassState getPseudoClasses()
Gets the pseudo class state.- Returns:
- the pseudo class state
-
getSpecificity
public int getSpecificity()
Gets the specificity.- Returns:
- the specificity
-
compareTo
public int compareTo(Match o)
Compares this object with the givenMatchobject.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:
compareToin interfaceComparable<Match>- Parameters:
o- theMatchobject to be compared- Returns:
- the difference between the specificity of this object and
the specificity of the given
Matchobject
-
-