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.
  • Enum Constant Details

  • Method Details

    • values

      public static ElementQuery.AttributeMatch.Comparison[] 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

      public static ElementQuery.AttributeMatch.Comparison valueOf(String name)
      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 name
      NullPointerException - if the argument is null
    • getOperator

      public String 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

      public String expressionFor(String name, String value)
      Builds the correct CSS matching expression for the given attribute name and value for this comparison.
      Parameters:
      name - the name of the attribute
      value - the value to match against the named attribute
      Returns:
      the CSS matching expression