@NotThreadSafe public static final class ImmutableServiceWeights.Builder extends Object
ImmutableServiceWeights.
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.
| Modifier and Type | Method and Description |
|---|---|
ImmutableServiceWeights |
build()
Builds a new
ImmutableServiceWeights. |
ImmutableServiceWeights.Builder |
from(ServiceWeights instance)
Fill a builder with attribute values from the provided
ServiceWeights instance. |
ImmutableServiceWeights.Builder |
passing(int passing)
Initializes the value for the
passing attribute. |
ImmutableServiceWeights.Builder |
warning(int warning)
Initializes the value for the
warning attribute. |
@CanIgnoreReturnValue public final ImmutableServiceWeights.Builder from(ServiceWeights instance)
ServiceWeights 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 ImmutableServiceWeights.Builder passing(int passing)
passing attribute.passing - The value for passingthis builder for use in a chained invocation@CanIgnoreReturnValue public final ImmutableServiceWeights.Builder warning(int warning)
warning attribute.warning - The value for warningthis builder for use in a chained invocationpublic ImmutableServiceWeights build()
ImmutableServiceWeights.IllegalStateException - if any required attributes are missingCopyright © 2019. All rights reserved.