public final class ImmutableDownloadConfig extends Object implements DownloadConfig
DownloadConfig.
Use the builder to create immutable instances:
ImmutableDownloadConfig.builder().
| Modifier and Type | Class and Description |
|---|---|
static class |
ImmutableDownloadConfig.Builder
Builds instances of type
ImmutableDownloadConfig. |
| Modifier and Type | Method and Description |
|---|---|
static ImmutableDownloadConfig.Builder |
builder()
Creates a builder for
ImmutableDownloadConfig. |
static ImmutableDownloadConfig |
copyOf(DownloadConfig instance)
Creates an immutable copy of a
DownloadConfig value. |
boolean |
equals(Object another)
This instance is equal to all instances of
ImmutableDownloadConfig that have equal attribute values. |
Optional<String> |
getAuthorization()
Deprecated.
|
TimeoutConfig |
getTimeoutConfig() |
String |
getUserAgent() |
int |
hashCode()
Computes a hash code from attributes:
proxyFactory, userAgent, authorization, timeoutConfig. |
Optional<de.flapdoodle.net.ProxyFactory> |
proxyFactory() |
String |
toString()
Prints the immutable value
DownloadConfig with attribute values. |
ImmutableDownloadConfig |
withAuthorization(Optional<String> optional)
Deprecated.
|
ImmutableDownloadConfig |
withAuthorization(String value)
Deprecated.
|
ImmutableDownloadConfig |
withProxyFactory(Optional<? extends de.flapdoodle.net.ProxyFactory> optional)
Copy the current immutable object by setting an optional value for the
proxyFactory attribute. |
ImmutableDownloadConfig |
withProxyFactory(de.flapdoodle.net.ProxyFactory value)
Copy the current immutable object by setting a present value for the optional
proxyFactory attribute. |
ImmutableDownloadConfig |
withTimeoutConfig(TimeoutConfig value)
Copy the current immutable object by setting a value for the
timeoutConfig attribute. |
ImmutableDownloadConfig |
withUserAgent(String value)
Copy the current immutable object by setting a value for the
userAgent attribute. |
clone, finalize, getClass, notify, notifyAll, wait, wait, waitdefaultspublic Optional<de.flapdoodle.net.ProxyFactory> proxyFactory()
proxyFactory in interface DownloadConfigproxyFactory attributepublic String getUserAgent()
getUserAgent in interface DownloadConfiguserAgent attribute@Deprecated public Optional<String> getAuthorization()
getAuthorization in interface DownloadConfigauthorization attributepublic TimeoutConfig getTimeoutConfig()
getTimeoutConfig in interface DownloadConfigtimeoutConfig attributepublic final ImmutableDownloadConfig withProxyFactory(de.flapdoodle.net.ProxyFactory value)
proxyFactory attribute.value - The value for proxyFactorythis if not changedpublic final ImmutableDownloadConfig withProxyFactory(Optional<? extends de.flapdoodle.net.ProxyFactory> optional)
proxyFactory attribute.
A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returning this.optional - An optional value for proxyFactorythis if not changedpublic final ImmutableDownloadConfig withUserAgent(String value)
userAgent attribute.
An equals check used to prevent copying of the same value by returning this.value - A new value for userAgentthis object@Deprecated public final ImmutableDownloadConfig withAuthorization(String value)
authorization attribute.value - The value for authorizationthis if not changed@Deprecated public final ImmutableDownloadConfig withAuthorization(Optional<String> optional)
authorization attribute.
An equality check is used on inner value to prevent copying of the same value by returning this.optional - An optional value for authorizationthis if not changedpublic final ImmutableDownloadConfig withTimeoutConfig(TimeoutConfig value)
timeoutConfig attribute.
A shallow reference equality check is used to prevent copying of the same value by returning this.value - A new value for timeoutConfigthis objectpublic boolean equals(Object another)
ImmutableDownloadConfig that have equal attribute values.public int hashCode()
proxyFactory, userAgent, authorization, timeoutConfig.public String toString()
DownloadConfig with attribute values.public static ImmutableDownloadConfig copyOf(DownloadConfig instance)
DownloadConfig value.
Uses accessors to get values to initialize the new immutable instance.
If an instance is already immutable, it is returned as is.instance - The instance to copypublic static ImmutableDownloadConfig.Builder builder()
ImmutableDownloadConfig.
ImmutableDownloadConfig.builder()
.proxyFactory(Optional<de.flapdoodle.net.ProxyFactory>) // optional proxyFactory
.userAgent(String) // optional userAgent
.authorization(Optional<String>) // optional authorization
.timeoutConfig(de.flapdoodle.embed.process.config.TimeoutConfig) // optional timeoutConfig
.build();
builder in interface DownloadConfigCopyright © 2025. All rights reserved.