- java.lang.Object
-
- org.joox.selector.AttributeSpecifier
-
- All Implemented Interfaces:
Specifier
class AttributeSpecifier extends java.lang.Object implements Specifier
An implementation ofSpecifier
for attributes. Note:
This implementation will also be used for ID selectors and class selectors.- See Also:
- Attribute selectors
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
AttributeSpecifier.Match
The type of match to perform for the attribute.-
Nested classes/interfaces inherited from interface org.joox.selector.Specifier
Specifier.Type
-
-
Field Summary
Fields Modifier and Type Field Description private AttributeSpecifier.Match
match
The type of match to perform for the attribute.private java.lang.String
name
The name of the attribute.private java.lang.String
value
The attribute value.
-
Constructor Summary
Constructors Constructor Description AttributeSpecifier(java.lang.String name)
Create a new attribute specifier with the specified attribute name.AttributeSpecifier(java.lang.String name, java.lang.String value, AttributeSpecifier.Match match)
Create a new attribute specifier with the specified name, value and match type.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AttributeSpecifier.Match
getMatch()
Get the type of match to perform for the attribute.java.lang.String
getName()
Get the name of the attribute.Specifier.Type
getType()
Get the specifier type.java.lang.String
getValue()
Get the attribute value.
-
-
-
Field Detail
-
name
private final java.lang.String name
The name of the attribute.
-
value
private final java.lang.String value
The attribute value.
-
match
private final AttributeSpecifier.Match match
The type of match to perform for the attribute.
-
-
Constructor Detail
-
AttributeSpecifier
public AttributeSpecifier(java.lang.String name)
Create a new attribute specifier with the specified attribute name. This attribute specifier is used to check if the attribute with the specified name exists whatever the value of the attribute.- Parameters:
name
- The name of the attribute.
-
AttributeSpecifier
public AttributeSpecifier(java.lang.String name, java.lang.String value, AttributeSpecifier.Match match)
Create a new attribute specifier with the specified name, value and match type.- Parameters:
name
- The name of the attribute.value
- The attribute value.match
- The type of match to perform for the attribute.
-
-
Method Detail
-
getName
public java.lang.String getName()
Get the name of the attribute.- Returns:
- The name of the attribute.
-
getValue
public java.lang.String getValue()
Get the attribute value.- Returns:
- The attribute value or
null
.
-
getMatch
public AttributeSpecifier.Match getMatch()
Get the type of match to perform for the attribute.- Returns:
- The type of match or
null
.
-
getType
public Specifier.Type getType()
Get the specifier type.
-
-