jodd.lagarto.csselly.selector
Class AttributeSelector

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

public class AttributeSelector
extends Selector
implements NodeFilter

Attribute selector.


Nested Class Summary
 
Nested classes/interfaces inherited from class jodd.lagarto.csselly.Selector
Selector.Type
 
Field Summary
protected  Match match
           
protected  java.lang.String name
           
protected  char quoteChar
           
protected  java.lang.String value
           
 
Fields inherited from class jodd.lagarto.csselly.Selector
type
 
Constructor Summary
AttributeSelector(java.lang.String attr)
           
AttributeSelector(java.lang.String name, Match match, java.lang.String value)
           
AttributeSelector(java.lang.String name, java.lang.String sign, java.lang.String value)
           
 
Method Summary
 boolean accept(Node node)
          Test whether a specified node is acceptable in some selection process.
protected  java.lang.String extractValue(java.lang.String value)
           
 Match getMatch()
          Returns matching type.
 java.lang.String getName()
          Returns attribute name.
 char getQuoteChar()
          Returns the quote char or 0 if quote is not used.
 java.lang.String getValue()
          Returns attribute value or null if doesn't exist.
 
Methods inherited from class jodd.lagarto.csselly.Selector
getType
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

name

protected final java.lang.String name

value

protected final java.lang.String value

match

protected final Match match

quoteChar

protected char quoteChar
Constructor Detail

AttributeSelector

public AttributeSelector(java.lang.String name,
                         java.lang.String sign,
                         java.lang.String value)

AttributeSelector

public AttributeSelector(java.lang.String name,
                         Match match,
                         java.lang.String value)

AttributeSelector

public AttributeSelector(java.lang.String attr)
Method Detail

extractValue

protected java.lang.String extractValue(java.lang.String value)

getName

public java.lang.String getName()
Returns attribute name.


getValue

public java.lang.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


Copyright © 2003-2012 Jodd Team