public class PseudoClassSelector extends Selector implements NodeFilter, NodeListFilter
Selectors introduces the concept of structural pseudo-classes to permit selection based on extra information that lies in the document tree but cannot be represented by other simple selectors or combinators.
Standalone text and other non-element nodes are not counted when calculating the position of an element in the list of children of its parent. When calculating the position of an element in the list of children of its parent, the index numbering starts at 1.
Selector.Type
Modifier and Type | Field and Description |
---|---|
protected static java.util.Map<java.lang.String,PseudoClass> |
PSEUDO_CLASS_MAP |
protected PseudoClass |
pseudoClass |
Constructor and Description |
---|
PseudoClassSelector(java.lang.String pseudoClassName) |
Modifier and Type | Method and Description |
---|---|
boolean |
accept(java.util.List<Node> currentResults,
Node node,
int index)
Accepts node within selected results.
|
boolean |
accept(Node node)
Matches node to this selector.
|
PseudoClass |
getPseudoClass()
Returns
pseudo class value. |
static PseudoClass |
lookupPseudoClass(java.lang.String pseudoClassName)
Lookups pseudo class for given pseudo class name.
|
static void |
registerPseudoClass(java.lang.Class<? extends PseudoClass> pseudoClassType)
Registers pseudo class.
|
protected static final java.util.Map<java.lang.String,PseudoClass> PSEUDO_CLASS_MAP
protected final PseudoClass pseudoClass
public static void registerPseudoClass(java.lang.Class<? extends PseudoClass> pseudoClassType)
public static PseudoClass lookupPseudoClass(java.lang.String pseudoClassName)
public PseudoClass getPseudoClass()
pseudo class
value.public boolean accept(Node node)
accept
in interface NodeFilter
public boolean accept(java.util.List<Node> currentResults, Node node, int index)
accept
in interface NodeListFilter
Copyright © 2003-present Jodd Team