APIdia Launch Partner
Top Description Fields Constructors Methods
javafx.css

public final Class Match

extends Object
implements Comparable<Match>
Class Inheritance
All Implemented Interfaces
java.lang.Comparable
Static Imports
javafx.geometry.NodeOrientation.INHERIT

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

Field Summary

Modifier and TypeField and Description
private final int
private final Set<PseudoClass>
private final Selector
private final int
private final int

Constructor Summary

AccessConstructor and Description
pack-priv
Match(final Selector selector, Set<PseudoClass> pseudoClasses, int idCount, int styleClassCount)

Method Summary

Modifier and TypeMethod and Description
public int

Returns:

the difference between the specificity of this object and the specificity of the given Match object
compareTo
(Match
the Match object to be compared
o
)

Implements java.lang.Comparable.compareTo.

Compares this object with the given Match object.

public Set<PseudoClass>

Returns:

the pseudo class state, never null
getPseudoClasses
()

Gets the pseudo class states as an immutable set.

public Selector

Returns:

the Selector, never null
getSelector
()

Gets the Selector.

public int

Returns:

the specificity
getSpecificity
()

Gets the specificity.

pack-priv static Match
of(Selector selector)

private static Match
private static Match
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

idCountback to summary
private final int idCount
pseudoClassesback to summary
private final Set<PseudoClass> pseudoClasses
selectorback to summary
private final Selector selector
specificityback to summary
private final int specificity
styleClassCountback to summary
private final int styleClassCount

Constructor Detail

Matchback to summary
pack-priv Match(final Selector selector, Set<PseudoClass> pseudoClasses, int idCount, int styleClassCount)

Method Detail

compareToback to summary
public int compareTo(Match o)

Implements java.lang.Comparable.compareTo.

Compares this object with the given Match 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.

Parameters
o:Match

the Match object to be compared

Returns:int

the difference between the specificity of this object and the specificity of the given Match object

Annotations
@Override
getPseudoClassesback to summary
public Set<PseudoClass> getPseudoClasses()

Gets the pseudo class states as an immutable set.

Returns:Set<PseudoClass>

the pseudo class state, never null

getSelectorback to summary
public Selector getSelector()

Gets the Selector.

Returns:Selector

the Selector, never null

getSpecificityback to summary
public int getSpecificity()

Gets the specificity.

Returns:int

the specificity

ofback to summary
pack-priv static Match of(Selector selector)
ofCompoundSelectorback to summary
private static Match ofCompoundSelector(CompoundSelector selector)
ofSimpleSelectorback to summary
private static Match ofSimpleSelector(SimpleSelector selector)