Interface OptionEnum

  • All Known Implementing Classes:
    BrowserVersionTrait, HtmlUnitOption

    public interface OptionEnum
    Represents an enumerated option that can be configured on a driver. Provides methods to access the option's key, property name, type, default value, and to apply, encode, or decode its value.
    Author:
    Scott Babcock
    • Method Detail

      • getCapabilityKey

        String getCapabilityKey()
        Returns the capability key associated with this option.
        Returns:
        the capability key
      • getPropertyName

        String getPropertyName()
        Returns the property name for this option.
        Returns:
        the property name
      • getOptionType

        Class<?> getOptionType()
        Returns the expected type of this option's value.
        Returns:
        the option type
      • getDefaultValue

        Object getDefaultValue()
        Returns the default value of this option.
        Returns:
        the default value
      • isDefaultValue

        boolean isDefaultValue​(Object value)
        Determines if the given value matches this option's default value.
        Parameters:
        value - the value to check
        Returns:
        true if the value is the default; false otherwise
      • applyPropertyTo

        void applyPropertyTo​(Map<String,​Object> optionsMap)
        Applies this option's value to the given options map.
        Parameters:
        optionsMap - the map of options to update
      • encode

        Object encode​(Object value)
        Encodes a value into a format suitable for storing or sending to the driver.
        Parameters:
        value - the value to encode
        Returns:
        the encoded value
      • decode

        Object decode​(Object value)
        Decodes a value from its stored or transmitted form back into the option's native type.
        Parameters:
        value - the value to decode
        Returns:
        the decoded value