Class ModifierSelector

java.lang.Object
dev.prozilla.pine.common.property.style.selector.Selector
dev.prozilla.pine.common.property.style.selector.ModifierSelector
All Implemented Interfaces:
Printable

public class ModifierSelector extends Selector
A selector that matches elements with a specific modifier.
  • Field Details

  • Constructor Details

    • ModifierSelector

      public ModifierSelector(String modifier)
  • Method Details

    • matches

      public boolean matches(Node node)
      Description copied from class: Selector
      Checks whether this selector matches a given node.
      Specified by:
      matches in class Selector
      Parameters:
      node - The node
      Returns:
      True if this selector matches the node.
    • getSpecificity

      public int getSpecificity()
      Description copied from class: Selector
      Returns an integer representing the specificity of this selector.
      Specified by:
      getSpecificity in class Selector
      Returns:
      The specificity of this selector
    • toString

      public String toString()
      Description copied from interface: Printable
      Returns a string representation of this object.
      Specified by:
      toString in interface Printable
      Overrides:
      toString in class Object
      Returns:
      String representation of this object.
    • equals

      public boolean equals(Selector other)
      Specified by:
      equals in class Selector