Package com.vaadin.testbench
Enum Class ElementQuery.AttributeMatch.Comparison
java.lang.Object
java.lang.Enum<ElementQuery.AttributeMatch.Comparison>
com.vaadin.testbench.ElementQuery.AttributeMatch.Comparison
- All Implemented Interfaces:
Serializable
,Comparable<ElementQuery.AttributeMatch.Comparison>
,Constable
- Enclosing class:
- ElementQuery.AttributeMatch
public static enum ElementQuery.AttributeMatch.Comparison
extends Enum<ElementQuery.AttributeMatch.Comparison>
Attribute matching comparisons.
This is a combination of a CSS selection operator and a negation flag.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionAttribute value begins with the given value.Attribute value contains the given value.Attribute value begins with a space/hyphen-separated prefix that matches the given value.Attribute value contains a space-separated word that matches the given value.Attribute value ends with the given value.Attribute exists (with or without a value).Attribute value and given value match exactly.Attribute value does not begin with the given value.Attribute value does not contain the given value.Attribute value does not begin with a space/hyphen-separated prefix that matches the given value.Attribute value must not contain a space-separated word that is prefixed with the given value.Attribute value does not end with the given value.Attribute does not exist (with or without a value).Attribute value and given value do not match exactly. -
Method Summary
Modifier and TypeMethodDescriptionexpressionFor
(String name, String value) Builds the correct CSS matching expression for the given attribute name and value for this comparison.Return the CSS selector operator for this comparisonboolean
Return the if the operator is to be negated.Returns the enum constant of this class with the specified name.values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
EXISTS
Attribute exists (with or without a value). -
MATCHES_EXACTLY
Attribute value and given value match exactly. -
CONTAINS
Attribute value contains the given value. -
CONTAINS_WORD
Attribute value contains a space-separated word that matches the given value. -
CONTAINS_PREFIX
Attribute value begins with a space/hyphen-separated prefix that matches the given value. The prefix must be either the entire attribute value or the leading hyphen-separated segments of the attribute value. -
BEGINS_WITH
Attribute value begins with the given value. -
ENDS_WITH
Attribute value ends with the given value. -
NOT_EXISTS
Attribute does not exist (with or without a value). -
NOT_MATCHES_EXACTLY
Attribute value and given value do not match exactly. -
NOT_CONTAINS
Attribute value does not contain the given value. -
NOT_CONTAINS_WORD
Attribute value must not contain a space-separated word that is prefixed with the given value.- See Also:
-
NOT_CONTAINS_PREFIX
Attribute value does not begin with a space/hyphen-separated prefix that matches the given value. -
NOT_BEGINS_WITH
Attribute value does not begin with the given value. -
NOT_ENDS_WITH
Attribute value does not end with the given value.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-
getOperator
Return the CSS selector operator for this comparison- Returns:
- CSS selector operator
-
isNegated
public boolean isNegated()Return the if the operator is to be negated.- Returns:
- true if this comparison's operator is to be negated, false otherwise
-
expressionFor
Builds the correct CSS matching expression for the given attribute name and value for this comparison.- Parameters:
name
- the name of the attributevalue
- the value to match against the named attribute- Returns:
- the CSS matching expression
-