@NotThreadSafe public static final class InputErrors.Builder extends Object
InputErrors.
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 |
|---|---|
InputErrors.Builder |
addAllErrors(Iterable<? extends InputError> elements)
Adds elements to
errors list. |
InputErrors.Builder |
addErrors(InputError... elements)
Adds elements to
errors list. |
InputErrors.Builder |
addErrors(InputError element)
Adds one element to
errors list. |
InputErrors |
build()
Builds a new
InputErrors. |
InputErrors.Builder |
from(InputErrorsIF instance)
Fill a builder with attribute values from the provided
InputErrorsIF instance. |
InputErrors.Builder |
setErrors(Iterable<? extends InputError> elements)
Sets or replaces all elements for
errors list. |
public final InputErrors.Builder from(InputErrorsIF instance)
InputErrorsIF instance.
Regular attribute values will be replaced with those from the given instance.
Absent optional values will not replace present values.
Collection elements and entries will be added, not replaced.instance - The instance from which to copy valuesthis builder for use in a chained invocationpublic final InputErrors.Builder addErrors(InputError element)
errors list.element - A errors elementthis builder for use in a chained invocationpublic final InputErrors.Builder addErrors(InputError... elements)
errors list.elements - An array of errors elementsthis builder for use in a chained invocationpublic final InputErrors.Builder setErrors(Iterable<? extends InputError> elements)
errors list.elements - An iterable of errors elementsthis builder for use in a chained invocationpublic final InputErrors.Builder addAllErrors(Iterable<? extends InputError> elements)
errors list.elements - An iterable of errors elementsthis builder for use in a chained invocationpublic InputErrors build() throws com.hubspot.immutables.validation.InvalidImmutableStateException
InputErrors.com.hubspot.immutables.validation.InvalidImmutableStateException - if any required attributes are missingCopyright © 2019. All rights reserved.