Spec-Zone.ru › OpenJavaFX 21

Class Match

java.lang.Object
javafx.css.Match
All Implemented Interfaces:
Comparable<Match>
public final class Match extends Object implements 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 Type Method Description
int compareTo(Match o)
Compares this object with the given Match object.
Set<PseudoClass> getPseudoClasses()
Gets the pseudo class states as an immutable set.
Selector getSelector()
Gets the Selector.
int getSpecificity()
Gets the specificity.

Methods declared in class java.lang.Object

clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Method Details

getSelector

public Selector getSelector()
Gets the Selector.
Returns:
the Selector, never null

getPseudoClasses

public Set<PseudoClass> 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

public int compareTo(Match o)
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.

Specified by:
compareTo in interface Comparable<Match>
Parameters:
o - the Match object to be compared
Returns:
the difference between the specificity of this object and the specificity of the given Match object

© 2008, 2025, Oracle and/or its affiliates. All rights reserved.
Documentation extracted from JavaFX API Documentation.
Licensed under the GNU General Public License, version 2, with the Classpath Exception.
Java, JavaFX and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API