public interface Selector
|Modifier and Type||Method and Description|
Checks whether or not this selector applies to the given widget.
Indicates whether some other object is "equal to" this one.
Returns the specificity of this selector.
boolean appliesToWidget(Widget widget)
widget- the widget to test.
trueif this selectors applies to the given widget,
equals method implements an equivalence relation on non-null object references:
trueif and only if
y, multiple invocations of
trueor consistently return
false, provided no information used in
equalscomparisons on the objects is modified.
equals method for class
Object implements the most discriminating possible
equivalence relation on objects; that is, for any non-null reference values
y, this method returns
true if and only if
y refer to the
same object (
x == y has the value
Note that it is generally necessary to override the
hashCode method whenever this method
is overridden, so as to maintain the general contract for the
hashCode method, which
states that equal objects must have equal hash codes.
The specificity allows to determine in which order the rules of a stylesheet should be applied.
A specificity is composed of four numbers (defined by CSS2 specification):
SelectorHelperprovides a method to compute the specificity of a selector.