- java.lang.Object
-
- org.joox.selector.PseudoNthSpecifier
-
- All Implemented Interfaces:
Specifier
class PseudoNthSpecifier extends java.lang.Object implements Specifier
An implementation ofSpecifierfornth-*pseudo-classes.- See Also:
- Pseudo-classes
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.joox.selector.Specifier
Specifier.Type
-
-
Constructor Summary
Constructors Constructor Description PseudoNthSpecifier(java.lang.String value, java.lang.String argument)Create a newnth-*pseudo-class instance with the specified value and argument.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetArgument()Get thenth-*pseudo-class argument.Specifier.TypegetType()Get the specifier type.java.lang.StringgetValue()Get thenth-*pseudo-class value.booleanisMatch(int count)Check if the node count matches this specifier.private voidparseNth()Parse thenth-*pseudo-class argument.
-
-
-
Constructor Detail
-
PseudoNthSpecifier
public PseudoNthSpecifier(java.lang.String value, java.lang.String argument)Create a newnth-*pseudo-class instance with the specified value and argument.- Parameters:
value- Thenth-*pseudo-class value (i.e.nth-childetc).argument- Thenth-*pseudo-class argument (i.e.oddetc).
-
-
Method Detail
-
getArgument
public java.lang.String getArgument()
Get thenth-*pseudo-class argument.- Returns:
- The argument.
-
getValue
public java.lang.String getValue()
Get thenth-*pseudo-class value.- Returns:
- The value.
-
getType
public Specifier.Type getType()
Get the specifier type.
-
isMatch
public boolean isMatch(int count)
Check if the node count matches this specifier.- Parameters:
count- The node count.- Returns:
trueorfalse.
-
parseNth
private void parseNth()
Parse thenth-*pseudo-class argument.
-
-