public static final class ImmutableInstanceInfo.Builder extends Object
ImmutableInstanceInfo.
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 |
|---|---|
ImmutableInstanceInfo |
build()
Builds a new
ImmutableInstanceInfo. |
ImmutableInstanceInfo.Builder |
from(InstanceInfo instance)
Fill a builder with attribute values from the provided
InstanceInfo instance. |
ImmutableInstanceInfo.Builder |
index(int index)
Initializes the value for the
index attribute. |
ImmutableInstanceInfo.Builder |
state(InstanceState state)
Initializes the value for the
state attribute. |
public final ImmutableInstanceInfo.Builder from(InstanceInfo instance)
InstanceInfo 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 invocationpublic final ImmutableInstanceInfo.Builder index(int index)
index attribute.index - The value for indexthis builder for use in a chained invocationpublic final ImmutableInstanceInfo.Builder state(InstanceState state)
state attribute.state - The value for statethis builder for use in a chained invocationpublic ImmutableInstanceInfo build()
ImmutableInstanceInfo.IllegalStateException - if any required attributes are missingCopyright © 2020 SAP SE. All rights reserved.