Record Class StyleWrapper
java.lang.Object
java.lang.Record
org.eclipse.e4.ui.css.core.impl.dom.StyleWrapper
public record StyleWrapper(CSSStyleDeclarationImpl style, int specificity, int position)
extends Record
A wrapper that holds a reference to the styles defined in a CSS rule block,
together with all the information needed to calculate a matching selector's
precedence.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Comparator<StyleWrapper> A comparator forStyleWrappers. -
Constructor Summary
ConstructorsConstructorDescriptionStyleWrapper(CSSStyleDeclarationImpl style, int specificity, int position) Creates an instance of aStyleWrapperrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intposition()Returns the value of thepositionrecord component.intReturns the value of thespecificityrecord component.style()Returns the value of thestylerecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
COMPARATOR
A comparator forStyleWrappers.
-
-
Constructor Details
-
StyleWrapper
Creates an instance of aStyleWrapperrecord class.- Parameters:
style- the value for thestylerecord componentspecificity- the value for thespecificityrecord componentposition- the value for thepositionrecord component
-
-
Method Details
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
style
Returns the value of thestylerecord component.- Returns:
- the value of the
stylerecord component
-
specificity
public int specificity()Returns the value of thespecificityrecord component.- Returns:
- the value of the
specificityrecord component
-
position
public int position()Returns the value of thepositionrecord component.- Returns:
- the value of the
positionrecord component
-