java.lang.Object
org.jhotdraw8.css.ast.AbstractSyntaxTree
org.jhotdraw8.css.ast.Selector
org.jhotdraw8.css.ast.SimpleSelector
org.jhotdraw8.css.ast.AbstractAttributeSelector
org.jhotdraw8.css.ast.SubstringMatchSelector
A "substring match selector"
*= matches an element if the element has
an attribute with the specified name and its value contains the specified
substring.- Author:
- Werner Randelshofer
-
Constructor Summary
ConstructorsConstructorDescriptionSubstringMatchSelector(@Nullable SourceLocator sourceLocator, @Nullable String namespacePattern, String attributeName, String substring) Creates a new instance. -
Method Summary
Modifier and TypeMethodDescriptionbooleaninthashCode()protected <T> @Nullable Tmatch(SelectorModel<T> model, T element) Returns the matching element.voidproduceTokens(Consumer<CssToken> consumer) Produces tokens for the subtree starting at this tree node.toString()Methods inherited from class org.jhotdraw8.css.ast.AbstractAttributeSelector
getSpecificityMethods inherited from class org.jhotdraw8.css.ast.Selector
matches, matchesOnlyOnASpecificTypeMethods inherited from class org.jhotdraw8.css.ast.AbstractSyntaxTree
getSourceLocator
-
Constructor Details
-
SubstringMatchSelector
public SubstringMatchSelector(@Nullable SourceLocator sourceLocator, @Nullable String namespacePattern, String attributeName, String substring) Creates a new instance.- Parameters:
sourceLocator- source locator for debuggingnamespacePattern- an optional namespace ("*" means any namespace, null means no namespace)attributeName- the attribute namesubstring- the substring in the attribute value
-
-
Method Details
-
match
Description copied from class:SelectorReturns the matching element. -
toString
-
produceTokens
Description copied from class:AbstractSyntaxTreeProduces tokens for the subtree starting at this tree node.- Overrides:
produceTokensin classAbstractSyntaxTree- Parameters:
consumer- a consumer for the tokens
-
equals
-
hashCode
public int hashCode()
-