@NotThreadSafe public static final class ProfileField.Builder extends Object
ProfileField.
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 |
|---|---|
ProfileField |
build()
Builds a new
ProfileField. |
ProfileField.Builder |
from(ProfileFieldIF instance)
Fill a builder with attribute values from the provided
ProfileFieldIF instance. |
ProfileField.Builder |
setAlt(Optional<String> alt)
Initializes the optional value
alt to alt. |
ProfileField.Builder |
setAlt(String alt)
Initializes the optional value
alt to alt. |
ProfileField.Builder |
setValue(String value)
Initializes the value for the
value attribute. |
public final ProfileField.Builder from(ProfileFieldIF instance)
ProfileFieldIF 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 ProfileField.Builder setValue(String value)
value attribute.value - The value for valuethis builder for use in a chained invocationpublic final ProfileField.Builder setAlt(@Nullable String alt)
alt to alt.alt - The value for alt, null is accepted as java.util.Optional.empty()this builder for chained invocationpublic final ProfileField.Builder setAlt(Optional<String> alt)
alt to alt.alt - The value for altthis builder for use in a chained invocationpublic ProfileField build() throws com.hubspot.immutables.validation.InvalidImmutableStateException
ProfileField.com.hubspot.immutables.validation.InvalidImmutableStateException - if any required attributes are missingCopyright © 2020. All rights reserved.