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 Summary
Modifier and TypeMethodDescriptionvoidapplyPropertyTo(Map<String, Object> optionsMap) Applies this option's value to the given options map.Decodes a value from its stored or transmitted form back into the option's native type.Encodes a value into a format suitable for storing or sending to the driver.Returns the capability key associated with this option.Returns the default value of this option.Class<?>Returns the expected type of this option's value.Returns the property name for this option.booleanisDefaultValue(Object value) Determines if the given value matches this option's default value.
-
Method Details
-
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
Determines if the given value matches this option's default value.- Parameters:
value- the value to check- Returns:
trueif the value is the default;falseotherwise
-
applyPropertyTo
Applies this option's value to the given options map.- Parameters:
optionsMap- the map of options to update
-
encode
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
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
-