java.lang.Object
org.joox.selector.PseudoNthSpecifier
- All Implemented Interfaces:
Specifier
An implementation of
Specifier for nth-* pseudo-classes.- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.joox.selector.Specifier
Specifier.Type -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionPseudoNthSpecifier(String value, String argument) Create a newnth-*pseudo-class instance with the specified value and argument. -
Method Summary
-
Field Details
-
value
Thenth-*pseudo-class value (i.e.nth-childetc). -
argument
Thenth-*pseudo-class argument (i.e.2n+1etc). -
a
private int aThe parsed a value. -
b
private int bThe parsed b value.
-
-
Constructor Details
-
PseudoNthSpecifier
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 Details
-
getArgument
Get thenth-*pseudo-class argument.- Returns:
- The argument.
-
getValue
Get thenth-*pseudo-class value.- Returns:
- The value.
-
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.
-