Package com.spotify.github.v3.checks
Class ImmutableInstallationList.Builder
- java.lang.Object
-
- com.spotify.github.v3.checks.ImmutableInstallationList.Builder
-
- Enclosing class:
- ImmutableInstallationList
@NotThreadSafe public static final class ImmutableInstallationList.Builder extends Object
Builds instances of typeImmutableInstallationList
. Initialize attributes and then invoke thebuild()
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.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ImmutableInstallationList.Builder
addAllInstallations(Iterable<? extends Installation> elements)
Adds elements toinstallations
list.ImmutableInstallationList.Builder
addInstallations(Installation element)
Adds one element toinstallations
list.ImmutableInstallationList.Builder
addInstallations(Installation... elements)
Adds elements toinstallations
list.ImmutableInstallationList
build()
Builds a newImmutableInstallationList
.ImmutableInstallationList.Builder
from(InstallationList instance)
Fill a builder with attribute values from the providedInstallationList
instance.ImmutableInstallationList.Builder
installations(Iterable<? extends Installation> elements)
Sets or replaces all elements forinstallations
list.ImmutableInstallationList.Builder
totalCount(int totalCount)
Initializes the value for thetotalCount
attribute.
-
-
-
Method Detail
-
from
@CanIgnoreReturnValue public final ImmutableInstallationList.Builder from(InstallationList instance)
Fill a builder with attribute values from the providedInstallationList
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.- Parameters:
instance
- The instance from which to copy values- Returns:
this
builder for use in a chained invocation
-
totalCount
@CanIgnoreReturnValue public final ImmutableInstallationList.Builder totalCount(int totalCount)
Initializes the value for thetotalCount
attribute.- Parameters:
totalCount
- The value for totalCount- Returns:
this
builder for use in a chained invocation
-
addInstallations
@CanIgnoreReturnValue public final ImmutableInstallationList.Builder addInstallations(Installation element)
Adds one element toinstallations
list.- Parameters:
element
- A installations element- Returns:
this
builder for use in a chained invocation
-
addInstallations
@CanIgnoreReturnValue public final ImmutableInstallationList.Builder addInstallations(Installation... elements)
Adds elements toinstallations
list.- Parameters:
elements
- An array of installations elements- Returns:
this
builder for use in a chained invocation
-
installations
@CanIgnoreReturnValue public final ImmutableInstallationList.Builder installations(Iterable<? extends Installation> elements)
Sets or replaces all elements forinstallations
list.- Parameters:
elements
- An iterable of installations elements- Returns:
this
builder for use in a chained invocation
-
addAllInstallations
@CanIgnoreReturnValue public final ImmutableInstallationList.Builder addAllInstallations(Iterable<? extends Installation> elements)
Adds elements toinstallations
list.- Parameters:
elements
- An iterable of installations elements- Returns:
this
builder for use in a chained invocation
-
build
public ImmutableInstallationList build()
Builds a newImmutableInstallationList
.- Returns:
- An immutable instance of InstallationList
- Throws:
IllegalStateException
- if any required attributes are missing
-
-