public static class ImmutableCamelScheme.Builder extends Object
ImmutableCamelScheme.
Initialize attributes and then invoke the build() method to create an
immutable instance.
Builder is not thread-safe and generally should not be stored in a field or collection,
but instead used immediately to create instances.
| Constructor and Description |
|---|
Builder()
Creates a builder for
ImmutableCamelScheme instances. |
| Modifier and Type | Method and Description |
|---|---|
ImmutableCamelScheme |
build()
Builds a new
ImmutableCamelScheme. |
CamelScheme.Builder |
from(CamelScheme instance)
Fill a builder with attribute values from the provided
CamelScheme instance. |
CamelScheme.Builder |
http(boolean http)
Initializes the value for the
http attribute. |
CamelScheme.Builder |
id(String id)
Initializes the value for the
id attribute. |
CamelScheme.Builder |
passive(boolean passive)
Initializes the value for the
passive attribute. |
public Builder()
ImmutableCamelScheme instances.
new CamelScheme.Builder()
.id(String) // required id
.http(boolean) // optional http
.passive(boolean) // optional passive
.build();
@CanIgnoreReturnValue public final CamelScheme.Builder from(CamelScheme instance)
CamelScheme instance.
Regular attribute values will be replaced with those from the given instance.
Absent optional values will not replace present values.instance - The instance from which to copy valuesthis builder for use in a chained invocation@CanIgnoreReturnValue public final CamelScheme.Builder id(String id)
id attribute.id - The value for idthis builder for use in a chained invocation@CanIgnoreReturnValue public final CamelScheme.Builder http(boolean http)
http attribute.
If not set, this attribute will have a default value as returned by the initializer of http.
http - The value for httpthis builder for use in a chained invocation@CanIgnoreReturnValue public final CamelScheme.Builder passive(boolean passive)
passive attribute.
If not set, this attribute will have a default value as returned by the initializer of passive.
passive - The value for passivethis builder for use in a chained invocationpublic ImmutableCamelScheme build()
ImmutableCamelScheme.IllegalStateException - if any required attributes are missingCopyright © 2020 The Apache Software Foundation. All rights reserved.