Class AttributeSpecifier

java.lang.Object
org.joox.selector.AttributeSpecifier
All Implemented Interfaces:
Specifier

class AttributeSpecifier extends Object implements Specifier
An implementation of Specifier for attributes.

Note:
This implementation will also be used for ID selectors and class selectors.

See Also:
  • Field Details

    • name

      private final String name
      The name of the attribute.
    • value

      private final String value
      The attribute value.
    • match

      private final AttributeSpecifier.Match match
      The type of match to perform for the attribute.
  • Constructor Details

    • AttributeSpecifier

      public AttributeSpecifier(String name)
      Create a new attribute specifier with the specified attribute name.

      This attribute specifier is used to check if the attribute with the specified name exists whatever the value of the attribute.

      Parameters:
      name - The name of the attribute.
    • AttributeSpecifier

      public AttributeSpecifier(String name, String value, AttributeSpecifier.Match match)
      Create a new attribute specifier with the specified name, value and match type.
      Parameters:
      name - The name of the attribute.
      value - The attribute value.
      match - The type of match to perform for the attribute.
  • Method Details

    • getName

      public String getName()
      Get the name of the attribute.
      Returns:
      The name of the attribute.
    • getValue

      public String getValue()
      Get the attribute value.
      Returns:
      The attribute value or null.
    • getMatch

      public AttributeSpecifier.Match getMatch()
      Get the type of match to perform for the attribute.
      Returns:
      The type of match or null.
    • getType

      public Specifier.Type getType()
      Get the specifier type.
      Specified by:
      getType in interface Specifier
      Returns:
      The specifier type.