Class Selector
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.CombinatorCombinatorA list of specifiers.private final StringTag name.static final StringThe 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.booleanReturns whether this selector has any specifiers or not.
-
Field Details
-
UNIVERSAL_TAG
-
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
-
getCombinator
-
getSpecifiers
-
hasSpecifiers
public boolean hasSpecifiers()Returns whether this selector has any specifiers or not.- Returns:
trueorfalse.
-