Package com.github.searls.jasmine.config
Class ImmutableWebDriverConfiguration
- java.lang.Object
-
- com.github.searls.jasmine.config.ImmutableWebDriverConfiguration
-
- All Implemented Interfaces:
WebDriverConfiguration
@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutableWebDriverConfiguration extends Object implements WebDriverConfiguration
Immutable implementation ofWebDriverConfiguration.Use the builder to create immutable instances:
ImmutableWebDriverConfiguration.builder().
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classImmutableWebDriverConfiguration.BuilderBuilds instances of typeImmutableWebDriverConfiguration.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ImmutableWebDriverConfiguration.Builderbuilder()Creates a builder forImmutableWebDriverConfiguration.static ImmutableWebDriverConfigurationcopyOf(WebDriverConfiguration instance)Creates an immutable copy of aWebDriverConfigurationvalue.booleanequals(Object another)This instance is equal to all instances ofImmutableWebDriverConfigurationthat have equal attribute values.URLgetRemoteWebDriverUrl()com.google.common.collect.ImmutableList<Capability>getWebDriverCapabilities()StringgetWebDriverClassName()inthashCode()Computes a hash code from attributes:webDriverClassName,webDriverCapabilities,remoteWebDriverUrl.StringtoString()Prints the immutable valueWebDriverConfigurationwith attribute values.ImmutableWebDriverConfigurationwithRemoteWebDriverUrl(URL value)Copy the current immutable object by setting a value for theremoteWebDriverUrlattribute.ImmutableWebDriverConfigurationwithWebDriverCapabilities(Capability... elements)Copy the current immutable object with elements that replace the content ofwebDriverCapabilities.ImmutableWebDriverConfigurationwithWebDriverCapabilities(Iterable<? extends Capability> elements)Copy the current immutable object with elements that replace the content ofwebDriverCapabilities.ImmutableWebDriverConfigurationwithWebDriverClassName(String value)Copy the current immutable object by setting a value for thewebDriverClassNameattribute.
-
-
-
Method Detail
-
getWebDriverClassName
public String getWebDriverClassName()
- Specified by:
getWebDriverClassNamein interfaceWebDriverConfiguration- Returns:
- The value of the
webDriverClassNameattribute
-
getWebDriverCapabilities
public com.google.common.collect.ImmutableList<Capability> getWebDriverCapabilities()
- Specified by:
getWebDriverCapabilitiesin interfaceWebDriverConfiguration- Returns:
- The value of the
webDriverCapabilitiesattribute
-
getRemoteWebDriverUrl
public URL getRemoteWebDriverUrl()
- Specified by:
getRemoteWebDriverUrlin interfaceWebDriverConfiguration- Returns:
- The value of the
remoteWebDriverUrlattribute
-
withWebDriverClassName
public final ImmutableWebDriverConfiguration withWebDriverClassName(String value)
Copy the current immutable object by setting a value for thewebDriverClassNameattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for webDriverClassName- Returns:
- A modified copy of the
thisobject
-
withWebDriverCapabilities
public final ImmutableWebDriverConfiguration withWebDriverCapabilities(Capability... elements)
Copy the current immutable object with elements that replace the content ofwebDriverCapabilities.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withWebDriverCapabilities
public final ImmutableWebDriverConfiguration withWebDriverCapabilities(Iterable<? extends Capability> elements)
Copy the current immutable object with elements that replace the content ofwebDriverCapabilities. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of webDriverCapabilities elements to set- Returns:
- A modified copy of
thisobject
-
withRemoteWebDriverUrl
public final ImmutableWebDriverConfiguration withRemoteWebDriverUrl(URL value)
Copy the current immutable object by setting a value for theremoteWebDriverUrlattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for remoteWebDriverUrl- Returns:
- A modified copy of the
thisobject
-
equals
public boolean equals(@Nullable Object another)This instance is equal to all instances ofImmutableWebDriverConfigurationthat have equal attribute values.
-
hashCode
public int hashCode()
Computes a hash code from attributes:webDriverClassName,webDriverCapabilities,remoteWebDriverUrl.
-
toString
public String toString()
Prints the immutable valueWebDriverConfigurationwith attribute values.
-
copyOf
public static ImmutableWebDriverConfiguration copyOf(WebDriverConfiguration instance)
Creates an immutable copy of aWebDriverConfigurationvalue. Uses accessors to get values to initialize the new immutable instance. If an instance is already immutable, it is returned as is.- Parameters:
instance- The instance to copy- Returns:
- A copied immutable WebDriverConfiguration instance
-
builder
public static ImmutableWebDriverConfiguration.Builder builder()
Creates a builder forImmutableWebDriverConfiguration.ImmutableWebDriverConfiguration.builder() .webDriverClassName(String) // requiredwebDriverClassName.addWebDriverCapabilities|addAllWebDriverCapabilities(com.github.searls.jasmine.mojo.Capability) //webDriverCapabilitieselements .remoteWebDriverUrl(java.net.URL) // requiredremoteWebDriverUrl.build();- Returns:
- A new ImmutableWebDriverConfiguration builder
-
-