java.lang.Object
org.joox.selector.Selector
Represents a selector.
A selector has a tag name, a combinator and a list of specifiers.
- See Also:
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Selector.Combinator
CombinatorA list of specifiers.private final String
Tag name.static final String
The universal tag name (i.e. -
Constructor Summary
ConstructorsConstructorDescriptionSelector()
Create a new instance with the tag name set to the value ofUNIVERSAL_TAG
, and with the combinator set toSelector.Combinator.DESCENDANT
.Create a new instance with the specified tag name and list of specifiers.Selector
(String tagName, Selector.Combinator combinator) Create a new instance with the specified tag name and combinator.Selector
(String tagName, Selector.Combinator combinator, List<Specifier> specifiers) Create a new instance with the specified tag name, combinator and list of specifiers. -
Method Summary
Modifier and TypeMethodDescriptionGet the combinator.Get the list of specifiers.Get the tag name.boolean
Returns whether this selector has any specifiers or not.
-
Field Details
-
UNIVERSAL_TAG
The universal tag name (i.e.*
).- See Also:
-
tagName
Tag name. -
combinator
Combinator -
specifiers
A list of specifiers.
-
-
Constructor Details
-
Selector
public Selector()Create a new instance with the tag name set to the value ofUNIVERSAL_TAG
, and with the combinator set toSelector.Combinator.DESCENDANT
. The list of specifiers will be set tonull
. -
Selector
Create a new instance with the specified tag name and combinator. The list of specifiers will be set tonull
.- Parameters:
tagName
- The tag name to set.combinator
- The combinator to set.
-
Selector
Create a new instance with the specified tag name and list of specifiers. The combinator will be set toSelector.Combinator.DESCENDANT
.- Parameters:
tagName
- The tag name to set.specifiers
- The list of specifiers to set.
-
Selector
Create a new instance with the specified tag name, combinator and list of specifiers.- Parameters:
tagName
- The tag name to set.combinator
- The combinator to set.specifiers
- The list of specifiers to set.
-
-
Method Details
-
getTagName
Get the tag name.- Returns:
- The tag name.
-
getCombinator
Get the combinator.- Returns:
- The combinator.
-
getSpecifiers
Get the list of specifiers.- Returns:
- The list of specifiers or
null
.
-
hasSpecifiers
public boolean hasSpecifiers()Returns whether this selector has any specifiers or not.- Returns:
true
orfalse
.
-