- java.lang.Object
-
- org.joox.selector.PseudoNthSpecifier
-
- All Implemented Interfaces:
Specifier
class PseudoNthSpecifier extends java.lang.Object implements Specifier
An implementation ofSpecifier
fornth-*
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.String
getArgument()
Get thenth-*
pseudo-class argument.Specifier.Type
getType()
Get the specifier type.java.lang.String
getValue()
Get thenth-*
pseudo-class value.boolean
isMatch(int count)
Check if the node count matches this specifier.private void
parseNth()
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-child
etc).argument
- Thenth-*
pseudo-class argument (i.e.odd
etc).
-
-
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:
true
orfalse
.
-
parseNth
private void parseNth()
Parse thenth-*
pseudo-class argument.
-
-