jodd.lagarto.csselly.selector
Class PseudoFunction<E>

java.lang.Object
  extended by jodd.lagarto.csselly.selector.PseudoFunction<E>
Direct Known Subclasses:
PseudoFunction.CONTAINS, PseudoFunction.EQ, PseudoFunction.GT, PseudoFunction.LT, PseudoFunction.NTH_CHILD, PseudoFunction.NTH_LAST_CHILD, PseudoFunction.NTH_LAST_OF_TYPE, PseudoFunction.NTH_OF_TYPE

public abstract class PseudoFunction<E>
extends java.lang.Object

Pseudo functions.


Nested Class Summary
static class PseudoFunction.CONTAINS
          Selects all elements that contain the specified text.
static class PseudoFunction.EQ
          Select the element at index n within the matched set.
static class PseudoFunction.GT
          Select all elements at an index greater than index within the matched set.
static class PseudoFunction.LT
          Select all elements at an index less than index within the matched set.
static class PseudoFunction.NTH_CHILD
          The :nth-child(an+b) pseudo-class notation represents an element that has an+b-1 siblings before it in the document tree, for any positive integer or zero value of n, and has a parent element.
static class PseudoFunction.NTH_LAST_CHILD
          The :nth-last-child(an+b) pseudo-class notation represents an element that has an+b-1 siblings after it in the document tree, for any positive integer or zero value of n, and has a parent element.
static class PseudoFunction.NTH_LAST_OF_TYPE
          The :nth-last-of-type(an+b) pseudo-class notation represents an element that has an+b-1 siblings with the same expanded element name after it in the document tree, for any zero or positive integer value of n, and has a parent element.
static class PseudoFunction.NTH_OF_TYPE
          The :nth-of-type(an+b) pseudo-class notation represents an element that has an+b-1 siblings with the same expanded element name before it in the document tree, for any zero or positive integer value of n, and has a parent element.
 
Constructor Summary
PseudoFunction()
           
 
Method Summary
 java.lang.String getPseudoFunctionName()
          Returns pseudo-function name.
 boolean match(java.util.LinkedList<Node> currentResults, Node node, int index, E expression)
          Returns true if node matches the pseudoclass within current results.
abstract  boolean match(Node node, E expression)
          Matches node using provided parsed expression.
abstract  E parseExpression(java.lang.String expression)
          Parses expression before usage.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PseudoFunction

public PseudoFunction()
Method Detail

parseExpression

public abstract E parseExpression(java.lang.String expression)
Parses expression before usage.


match

public abstract boolean match(Node node,
                              E expression)
Matches node using provided parsed expression.


match

public boolean match(java.util.LinkedList<Node> currentResults,
                     Node node,
                     int index,
                     E expression)
Returns true if node matches the pseudoclass within current results.


getPseudoFunctionName

public java.lang.String getPseudoFunctionName()
Returns pseudo-function name.



Copyright © 2003-2012 Jodd Team