Class AttributeSelector

java.lang.Object
jodd.csselly.Selector
jodd.csselly.selector.AttributeSelector
All Implemented Interfaces:
NodeFilter

public class AttributeSelector extends Selector implements NodeFilter
Attribute selector.
  • Field Details

    • name

      protected final String name
    • value

      protected final String value
    • match

      protected final Match match
    • quoteChar

      protected char quoteChar
  • Constructor Details

    • AttributeSelector

      public AttributeSelector(String name, String sign, String value)
    • AttributeSelector

      public AttributeSelector(String name, Match match, String value)
    • AttributeSelector

      public AttributeSelector(String attr)
  • Method Details

    • extractValue

      protected String extractValue(String value)
    • getName

      public String getName()
      Returns attribute name.
    • getValue

      public String getValue()
      Returns attribute value or null if doesn't exist.
    • getMatch

      public Match getMatch()
      Returns matching type.
    • getQuoteChar

      public char getQuoteChar()
      Returns the quote char or 0 if quote is not used.
    • accept

      public boolean accept(Node node)
      Description copied from interface: NodeFilter
      Test whether a specified node is acceptable in some selection process.
      Specified by:
      accept in interface NodeFilter